Humanoid.AutoRotate=false local s=Character:GetDescendants()for s,e in pairs(s)do if e:IsA("\077\111\116\111\114\054\068")then local s=Instance.new("\066\097\108\108\083\111\099\107\101\116\067\111\110\115\116\114\097\105\110\116",e.Parent)local n=Instance.new("\065\116\116\097\099\104\109\101\110\116",e.Part0)or e.Parent:FindFirstChild("\065\116\116\097\099\104\109\101\110\116")local T=Instance.new("\065\116\116\097\099\104\109\101\110\116",e.Part1)or e.Parent:FindFirstChild("\065\116\116\097\099\104\109\101\110\116")n.CFrame=e.C0 T.CFrame=e.C1 s.Attachment0=n s.Attachment1=T s.LimitsEnabled=true s.TwistLimitsEnabled=true e:Destroy()end if e:IsA("\087\101\108\100")then local s=e:Clone()s.Parent=e.Parent e:Destroy()end if e.Parent==Character then if e:IsA("\080\097\114\116")or e:IsA("\077\101\115\104\080\097\114\116")then e.CanCollide=true end end end
-- Ragdoll
Humanoid.AutoRotate = false
local Descendants = Character:GetDescendants()
for i, obj in pairs(Descendants) do
	-- If the descendant is a k then replace it with a socket
	if obj:IsA("Motor6D") then
		-- totally didnt take most of this from a youtube video
		local Socket = Instance.new("BallSocketConstraint", obj.Parent)
		local a1 = Instance.new("Attachment", obj.Part0) or obj.Parent:FindFirstChild("Attachment")
		local a2 = Instance.new("Attachment", obj.Part1) or obj.Parent:FindFirstChild("Attachment")
		a1.CFrame = obj.C0
		a2.CFrame = obj.C1
		Socket.Attachment0 = a1
		Socket.Attachment1 = a2
		Socket.LimitsEnabled = true
		Socket.TwistLimitsEnabled = true
		obj:Destroy()
	end
	-- If the descendant is a weld, realign the position --
	if obj:IsA("Weld") then
		local Weld = obj:Clone()
		Weld.Parent = obj.Parent
		obj:Destroy()
	end
	-- Make all parts collidable
	if obj.Parent == Character then
		if obj:IsA("Part") or obj:IsA("MeshPart") then
			obj.CanCollide = true
		end
	end
end
