local function r(r)local H,o,S={},{},{}for d=1,#r,1 do H[d],o[d],S[d]=r[d].x,r[d].y,r[d].z end local d=Vector3.new(math.min(unpack(H)),math.min(unpack(o)),math.min(unpack(S)))local R=Vector3.new(math.max(unpack(H)),math.max(unpack(o)),math.max(unpack(S)))return d,R end
-- Private functions

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
