local T={}for S,E in pairs(script:GetChildren())do T[E.Name]=E end local S=require(script.Parent:WaitForChild("\103\101\116\076\097\115\116\087\111\114\100\070\114\111\109\080\097\115\099\097\108\067\097\115\101"))function getConstraintTemplate(E)E=S(E)return T[E]or T.Default end function createConstraint(T)local S=T.Joint.Name local E=(getConstraintTemplate(S)):Clone()E.Attachment0=T.Attachment0 E.Attachment1=T.Attachment1 E.Name=S.."\082\097\103\100\111\108\108\067\111\110\115\116\114\097\105\110\116"local u=Instance.new("\079\098\106\101\099\116\086\097\108\117\101",E)u.Name="\082\105\103\105\100\074\111\105\110\116"u.Value=T.Joint return E end return function(T)local S=Instance.new("\070\111\108\100\101\114")S.Name="\082\097\103\100\111\108\108\067\111\110\115\116\114\097\105\110\116\115"for T,E in pairs(T)do if E.Joint.Name~="\082\111\111\116"then(createConstraint(E)).Parent=S end end return S end


local v1 = {};
for v2, v3 in pairs(script:GetChildren()) do
	v1[v3.Name] = v3;
end;
local u1 = require(script.Parent:WaitForChild("getLastWordFromPascalCase"));
function getConstraintTemplate(p1)
	p1 = u1(p1);
	return v1[p1] or v1.Default;
end;
function createConstraint(p2)
	local l__Name__4 = p2.Joint.Name;
	local v5 = getConstraintTemplate(l__Name__4):Clone();
	v5.Attachment0 = p2.Attachment0;
	v5.Attachment1 = p2.Attachment1;
	v5.Name = l__Name__4 .. "RagdollConstraint";
	local v6 = Instance.new("ObjectValue", v5);
	v6.Name = "RigidJoint";
	v6.Value = p2.Joint;
	return v5;
end;
return function(p3)
	local v7 = Instance.new("Folder");
	v7.Name = "RagdollConstraints";
	for v8, v9 in pairs(p3) do
		if v9.Joint.Name ~= "Root" then
			createConstraint(v9).Parent = v7;
		end;
	end;
	return v7;
end;
