All pastes #916895 Raw Edit

GetMass(object)

public lua v1 · immutable
#916895 ·published 2008-02-25 00:03 UTC
rendered paste body
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 		mass = mass + GetMass(c[i]) 	end 	return massend