Humanoid.Died:Connect(function()for N,T in pairs(Character:GetDescendants())do if T:IsA("\077\111\116\111\114\054\068")then local N=Instance.new("\065\116\116\097\099\104\109\101\110\116")N.Parent=T.Part0 N.CFrame=T.C0 local g=Instance.new("\065\116\116\097\099\104\109\101\110\116")g.Parent=T.Part1 g.CFrame=T.C1 local r=Instance.new("\066\097\108\108\083\111\099\107\101\116\067\111\110\115\116\114\097\105\110\116")r.Parent=T.Parent r.Attachment0=N r.Attachment1=g T:Destroy()elseif T.Name=="\072\101\097\100"and T:IsA("\066\097\115\101\080\097\114\116")then local N=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")N.Parent=T N.Part0=T N.Part1=HRP end end end)

Humanoid.Died:Connect(function()
	for i, Joint in pairs(Character:GetDescendants()) do
		if Joint:IsA("Motor6D") then
			local A0 = Instance.new("Attachment")
			A0.Parent = Joint.Part0
			A0.CFrame = Joint.C0			
			
			local A1 = Instance.new("Attachment")
			A1.Parent = Joint.Part1
			A1.CFrame = Joint.C1	
			
			local BallSocketConstraint = Instance.new("BallSocketConstraint")
			BallSocketConstraint.Parent = Joint.Parent
			BallSocketConstraint.Attachment0 = A0
			BallSocketConstraint.Attachment1 = A1
			
			Joint:Destroy()
		elseif Joint.Name == "Head" and Joint:IsA("BasePart") then
			local WeldConstraint = Instance.new("WeldConstraint")
			WeldConstraint.Parent = Joint
			WeldConstraint.Part0 = Joint
			WeldConstraint.Part1 = HRP
		
		end
	end
end)
