local function s(s)local u,X,x={},{},{}for y=1,#s,1 do u[y],X[y],x[y]=s[y].x,s[y].y,s[y].z end local y=Vector3.new(math.min(unpack(u)),math.min(unpack(X)),math.min(unpack(x)))local t=Vector3.new(math.max(unpack(u)),math.max(unpack(X)),math.max(unpack(x)))return y,t end


local function worldBoundingBox(set)
	local x, y, z = {}, {}, {}
	for i = 1, #set do x[i], y[i], z[i] = set[i].x, set[i].y, set[i].z end
	local min = Vector3.new(math.min(unpack(x)), math.min(unpack(y)), math.min(unpack(z)))
	local max = Vector3.new(math.max(unpack(x)), math.max(unpack(y)), math.max(unpack(z)))
	return min, max
end
