function GetMass(object) local check,mass,c = {"Part","SpawnLocation","FlagStand","Seat"},0,object:GetChildren() function runCheck(class) for i = 1, #check do if check[i]:lower() == class:lower() then return true end end return false end if runCheck(object.className) then mass = mass + object:GetMass() end for i = 1, #c do if runCheck(c[i].className) then mass = mass + c[i]:GetMass() else mass = mass + GetMass(c[i]) end end return mass end