function ActiveRagdoll(j,L)local u=j local a=u.Humanoid u.HumanoidRootPart.Massless=true a:ChangeState(Enum.HumanoidStateType.Physics)for j,L in pairs(u:GetDescendants())do if L:IsA("\077\111\116\111\114\054\068")then local j,u=Instance.new("\065\116\116\097\099\104\109\101\110\116"),Instance.new("\065\116\116\097\099\104\109\101\110\116")j.CFrame=L.C0 u.CFrame=L.C1 j.Parent=L.Part0 u.Parent=L.Part1 local a=Instance.new("\066\097\108\108\083\111\099\107\101\116\067\111\110\115\116\114\097\105\110\116")a.Attachment0=j a.Attachment1=u a.Parent=L.Part0 L.Enabled=false end end delay(L,function()for j,L in pairs(u:GetDescendants())do if L:IsA("\077\111\116\111\114\054\068")then L.Enabled=true end if L.Name=="\066\097\108\108\083\111\099\107\101\116\067\111\110\115\116\114\097\105\110\116"then L:Destroy()end if L.Name=="\065\116\116\097\099\104\109\101\110\116"then L:Destroy()end u.HumanoidRootPart.Massless=false a.PlatformStand=false a:ChangeState(Enum.HumanoidStateType.Ragdoll,false)end end)end module.RagDoll=function(j,L)spawn(function()ActiveRagdoll(j,L)end)end return module


function ActiveRagdoll(plr,Seconds)
	local character = plr
	local humanoid = character.Humanoid
	character.HumanoidRootPart.Massless = true
	humanoid:ChangeState(Enum.HumanoidStateType.Physics)
	for _, v in pairs(character:GetDescendants()) do
		if v:IsA("Motor6D") then
			local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
			a0.CFrame = v.C0
			a1.CFrame = v.C1
			a0.Parent = v.Part0
			a1.Parent = v.Part1
			local b = Instance.new("BallSocketConstraint")
			b.Attachment0 = a0
			b.Attachment1 = a1
			b.Parent = v.Part0
			v.Enabled = false
		end
	end
	delay(Seconds,function()
		for _,v in pairs(character:GetDescendants()) do
			if v:IsA('Motor6D') then
				v.Enabled = true
			end
			if v.Name == 'BallSocketConstraint' then
				v:Destroy()
			end
			if v.Name == 'Attachment' then
				v:Destroy()
			end
			character.HumanoidRootPart.Massless = false
			humanoid.PlatformStand = false
			humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll,false)
		end
	end)
end


module.RagDoll = function(plr,Seconds)
	spawn(function()
		ActiveRagdoll(plr,Seconds)
	end)
end


return module
