wait()character.HumanoidRootPart.Anchored=true character.HumanoidRootPart.CanCollide=false wait()recurse(character,function(E,l)if l:IsA("\065\116\116\097\099\104\109\101\110\116")then l.Axis=Vector3.new(0,1,0)l.SecondaryAxis=Vector3.new(0,0,1)l.Rotation=Vector3.new(0,0,0)end end)for E,l in next,character:GetChildren()do if l:IsA("\065\099\099\111\117\116\114\101\109\101\110\116")then l:Destroy()end end ragdollJoint(character.LowerTorso,character.UpperTorso,"\087\097\105\115\116","\066\097\108\108\083\111\099\107\101\116",{{"\076\105\109\105\116\115\069\110\097\098\108\101\100";true};{"\085\112\112\101\114\065\110\103\108\101";5}})ragdollJoint(character.UpperTorso,character.Head,"\078\101\099\107","\066\097\108\108\083\111\099\107\101\116",{{"\076\105\109\105\116\115\069\110\097\098\108\101\100";true};{"\085\112\112\101\114\065\110\103\108\101";15}})local E={{"\076\105\109\105\116\115\069\110\097\098\108\101\100";true};{"\085\112\112\101\114\065\110\103\108\101",0};{"\076\111\119\101\114\065\110\103\108\101";0}}ragdollJoint(character.LeftLowerArm,character.LeftHand,"\076\101\102\116\087\114\105\115\116","\072\105\110\103\101",E)ragdollJoint(character.RightLowerArm,character.RightHand,"\082\105\103\104\116\087\114\105\115\116","\072\105\110\103\101",E)local l={{"\076\105\109\105\116\115\069\110\097\098\108\101\100",true};{"\085\112\112\101\114\065\110\103\108\101";0},{"\076\111\119\101\114\065\110\103\108\101";-75}}ragdollJoint(character.LeftUpperLeg,character.LeftLowerLeg,"\076\101\102\116\075\110\101\101","\072\105\110\103\101",l)ragdollJoint(character.RightUpperLeg,character.RightLowerLeg,"\082\105\103\104\116\075\110\101\101","\072\105\110\103\101",l)local i={{"\076\105\109\105\116\115\069\110\097\098\108\101\100";true};{"\085\112\112\101\114\065\110\103\108\101",15};{"\076\111\119\101\114\065\110\103\108\101";-45}}ragdollJoint(character.LeftLowerLeg,character.LeftFoot,"\076\101\102\116\065\110\107\108\101","\072\105\110\103\101",i)ragdollJoint(character.RightLowerLeg,character.RightFoot,"\082\105\103\104\116\065\110\107\108\101","\072\105\110\103\101",i)ragdollJoint(character.UpperTorso,character.LeftUpperArm,"\076\101\102\116\083\104\111\117\108\100\101\114","\066\097\108\108\083\111\099\107\101\116")ragdollJoint(character.LeftUpperArm,character.LeftLowerArm,"\076\101\102\116\069\108\098\111\119","\066\097\108\108\083\111\099\107\101\116")ragdollJoint(character.UpperTorso,character.RightUpperArm,"\082\105\103\104\116\083\104\111\117\108\100\101\114","\066\097\108\108\083\111\099\107\101\116")ragdollJoint(character.RightUpperArm,character.RightLowerArm,"\082\105\103\104\116\069\108\098\111\119","\066\097\108\108\083\111\099\107\101\116")ragdollJoint(character.LowerTorso,character.LeftUpperLeg,"\076\101\102\116\072\105\112","\066\097\108\108\083\111\099\107\101\116")ragdollJoint(character.LowerTorso,character.RightUpperLeg,"\082\105\103\104\116\072\105\112","\066\097\108\108\083\111\099\107\101\116")local h=script.Parent wait()while wait()do script.Parent.UpperTorso.Velocity=Vector3.new(0,-10,0)end

	wait()

	--Make it so ragdoll can't collide with invisible HRP, but don't let HRP fall through map and be destroyed in process	
	character.HumanoidRootPart.Anchored = true
	character.HumanoidRootPart.CanCollide = false

	--Helps to fix constraint spasms
	wait()
	recurse(character, function(_,v)
		if v:IsA("Attachment") then
			v.Axis = Vector3.new(0, 1, 0)
			v.SecondaryAxis = Vector3.new(0, 0, 1)
			v.Rotation = Vector3.new(0, 0, 0)
		end
	end)
	
	--Re-attach hats
	for _,child in next,character:GetChildren() do
		if child:IsA("Accoutrement") then
			--Loop through all parts instead of only checking for one to be forwards-compatible in the event
			--ROBLOX implements multi-part accessories
			child:Destroy()
		end
	end
	ragdollJoint(character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
		{"LimitsEnabled",true};
		{"UpperAngle",5};
	})
	ragdollJoint(character.UpperTorso, character.Head, "Neck", "BallSocket", {
		{"LimitsEnabled",true};
		{"UpperAngle",15};
	})
	
	local handProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle",0};
		{"LowerAngle",0};
	}
	ragdollJoint(character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
	ragdollJoint(character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
	
	local shinProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle", 0};
		{"LowerAngle", -75};
	}
	ragdollJoint(character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
	ragdollJoint(character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
	
	local footProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle", 15};
		{"LowerAngle", -45};
	}
	ragdollJoint(character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
	ragdollJoint(character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
	
	--TODO fix ability for socket to turn backwards whenn ConeConstraints are shipped
	ragdollJoint(character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
	ragdollJoint(character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
	ragdollJoint(character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
	ragdollJoint(character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
	ragdollJoint(character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
	ragdollJoint(character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
	local cc = script.Parent
	wait()
	while wait() do
		script.Parent.UpperTorso.Velocity = Vector3.new(0,-10,0)
	end