Model=script.Parent Debris=game:GetService("\068\101\098\114\105\115")Removing=false function RemoveModel()if Removing then return end local C={}for e,s in pairs(Model:GetChildren())do if s:IsA("\077\111\100\101\108")then table.insert(C,s)end end if#C==0 then Removing=true Model.Name=""Debris:AddItem(Model,1)end end Model.ChildRemoved:connect(function(C)RemoveModel()end)RemoveModel()
--Made by Luckymaxer

Model = script.Parent

Debris = game:GetService("Debris")

Removing = false

function RemoveModel()
	if Removing then
		return
	end
	local Parts = {}
	for i, v in pairs(Model:GetChildren()) do
		if v:IsA("Model") then
			table.insert(Parts, v)
		end
	end
	if #Parts == 0 then
		Removing = true
		Model.Name = ""
		Debris:AddItem(Model, 1)
	end
end

Model.ChildRemoved:connect(function(Child)
	RemoveModel()
end)

RemoveModel()
