local function a(a)local z=a local d=a.Parent while not d:IsA("\070\111\108\100\101\114")do z=d d=d.Parent end return z end local function z(a,z)local d=workspace:FindFirstChild("\066\097\115\101\112\108\097\116\101")local m=(d:GetChildren())[1].Position local Q=(d:GetChildren())[1].Size local E=z.Y local W=m.Y local P=Q.Y return Vector3.new(z.X,(W+P/2)+a.Size.Y/2,z.Z)end local function d(a)local z=a:GetChildren()for a,z in pairs(z)do if z:IsA("\077\111\100\101\108")then d(z)elseif z:IsA("\080\097\114\116")then z.CanCollide=false end end end

local function getTopAncestor(part)
	local prevParent = part
	local parent = part.Parent
		
	while not parent:IsA("Folder") do
		prevParent = parent
		parent = parent.Parent
	end
		
	return prevParent
end

local function getPositionRelativetoBase(part, pos)
	local basePlate = workspace:FindFirstChild("Baseplate")
	local basePosition = basePlate:GetChildren()[1].Position
	local baseSize = basePlate:GetChildren()[1].Size
	
	local posY = pos.Y
	local basePosY = basePosition.Y
	local baseSizeY = baseSize.Y
	return Vector3.new(pos.X, (basePosY + baseSizeY/2) + part.Size.Y/2, pos.Z)
end
	
local function breakModel(model)
	local children = model:GetChildren()
		
	for i,child in pairs(children) do
		-- Make part/model non-collidable
		if child:IsA("Model") then
			breakModel(child)
		elseif child:IsA("Part") then
			child.CanCollide = false
		end
	end
end
