Model=script.Parent Debris=game:GetService("\068\101\098\114\105\115")Creator=script:FindFirstChild("\067\114\101\097\116\111\114")Tool=script:FindFirstChild("\084\111\111\108")FadeRate=.025 Rate=.066666666666667 Removing=false function DestroyModel()if Removing then return end Model.Name=""for f,S in pairs(Model:GetChildren())do if S:IsA("\066\097\115\101\080\097\114\116")then S.Transparency=1 S.Anchored=true S.CanCollide=false for f,S in pairs(S:GetChildren())do if S:IsA("\070\105\114\101")or S:IsA("\083\109\111\107\101")or S:IsA("\083\112\097\114\107\108\101\115")or S:IsA("\076\105\103\104\116")or S:IsA("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")then S.Enabled=false end end end end Removing=true Debris:AddItem(Model,1.5)end function ClearModel()if Removing then return end local f={}for S,v in pairs(Model:GetChildren())do if v:IsA("\066\097\115\101\080\097\114\116")then table.insert(f,v)end end if#f==0 then Removing=true Model.Name=""Debris:AddItem(Model,.5)end end if not Creator or not Creator.Value or not Creator.Value:IsA("\080\108\097\121\101\114")or not Creator.Value.Parent or not Tool or not Tool.Value or not Tool.Value.Parent then DestroyModel()return end Creator=Creator.Value Tool=Tool.Value Character=Creator.Character if not Character then DestroyModel()return end Creator.Changed:connect(function(f)if f=="\080\097\114\101\110\116"and not Creator.Parent then DestroyModel()end end)Character.Changed:connect(function(f)if f=="\080\097\114\101\110\116"and not Character.Parent then DestroyModel()end end)Tool.Changed:connect(function(f)if f=="\080\097\114\101\110\116"then DestroyModel()end end)Model.ChildRemoved:connect(function(f)ClearModel()end)wait(1)ClearModel()


Model = script.Parent

Debris = game:GetService("Debris")

Creator = script:FindFirstChild("Creator")
Tool = script:FindFirstChild("Tool")

FadeRate = 0.025
Rate = (1 / 15)

Removing = false

function DestroyModel()
	if Removing then
		return
	end
	Model.Name = ""
	for i, v in pairs(Model:GetChildren()) do
		if v:IsA("BasePart") then
			v.Transparency = 1
			v.Anchored = true
			v.CanCollide = false
			for ii, vv in pairs(v:GetChildren()) do
				if vv:IsA("Fire") or vv:IsA("Smoke") or vv:IsA("Sparkles") or vv:IsA("Light") or vv:IsA("ParticleEmitter") then
					vv.Enabled = false
				end
			end
		end
	end
	Removing = true
	Debris:AddItem(Model, 1.5)
end

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

if not Creator or not Creator.Value or not Creator.Value:IsA("Player") or not Creator.Value.Parent or not Tool or not Tool.Value or not Tool.Value.Parent then
	DestroyModel()
	return
end

Creator = Creator.Value
Tool = Tool.Value

Character = Creator.Character
if not Character then
	DestroyModel()
	return
end

Creator.Changed:connect(function(Property)
	if Property == "Parent" and not Creator.Parent then
		DestroyModel()
	end
end)

Character.Changed:connect(function(Property)
	if Property == "Parent" and not Character.Parent then
		DestroyModel()
	end
end)

Tool.Changed:connect(function(Property)
	if Property == "Parent" then
		DestroyModel()
	end
end)

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

wait(1)

ClearModel()
