All pastes #916833 Raw Edit

GetMass(object)

public lua v1 · immutable
#916833 ·published 2008-02-24 23:17 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 		if runCheck(c[i].className) then			mass = mass + c[i]:GetMass() 		else 			mass = mass + GetMass(c[i]) 		end	end 	return massend