All pastes #898346 Raw Edit

GetMass(object)

public lua v1 · immutable
#898346 ·published 2008-02-10 07:00 UTC
rendered paste body
function GetMass(object) 	local mass = 0 	if object.className == "Part"	or c[i].className == "SpawnLocation" 	or c[i].className == "FlagStand" 	or c[i].className == "Seat" then 		mass = mass + object:GetMass() 	end 	local c = object:GetChildren() 	for i = 1, #c do 	if c[i].className == "Part" 	or c[i].className == "SpawnLocation" 	or c[i].className == "FlagStand" 	or c[i].className == "Seat" then 		mass = mass + c[i]:GetMass() 	else 		mass = mass + GetMass(c[i]) 	end 	end 	return massend