local function t(t,y,S)local g={}for W=1,#S,1 do g[W]=t:PointToWorldSpace(S[W]*y)end return g end local function y(t)local y=t[1]for S=2,#t,1 do y=y+t[2]end return y/#t end local function S(t)if t.ClassName=="\080\097\114\116"then if t.Shape==Enum.PartType.Block then return"\066\108\111\099\107"elseif t.Shape==Enum.PartType.Cylinder then return"\067\121\108\105\110\100\101\114"elseif t.Shape==Enum.PartType.Ball then return"\066\097\108\108"end elseif t.ClassName=="\087\101\100\103\101\080\097\114\116"then return"\087\101\100\103\101"elseif t.ClassName=="\067\111\114\110\101\114\087\101\100\103\101\080\097\114\116"then return"\067\111\114\110\101\114\087\101\100\103\101"elseif t:IsA("\066\097\115\101\080\097\114\116")then return"\066\108\111\099\107"end end
-- Useful functions

local function vertShape(cf, size2, array)
	local output = {}
	for i = 1, #array do
		output[i] = cf:PointToWorldSpace(array[i] * size2)
	end
	return output
end

local function getCentroidFromSet(set)
	local sum = set[1]
	for i = 2, #set do
		sum = sum + set[2]
	end
	return sum / #set
end

local function classify(part)
	if part.ClassName == "Part" then
		if part.Shape == Enum.PartType.Block then
			return "Block"
		elseif part.Shape == Enum.PartType.Cylinder then
			return "Cylinder"
		elseif part.Shape == Enum.PartType.Ball then
			return "Ball"
		end
	elseif part.ClassName == "WedgePart" then
		return "Wedge"
	elseif part.ClassName == "CornerWedgePart" then
		return "CornerWedge"
	elseif part:IsA("BasePart") then -- mesh, CSG, truss, etc... just use block
		return "Block"
	end
end
