Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print'https://pastebin.com/raw/5QSqffmx';
- local function Instance_2(c,p)if not c then return;end;p=p or {};
- local a=Instance.new(c,p.Parent);for b,c in pairs(p)do local _,d= pcall(function()a[b]=c;end);
- if d then print(d);end;end;return a;end;
- local function Ragdoll_v2(model)local hum=model:FindFirstChildWhichIsA'Humanoid';if not hum then
- return;end;hum.BreakJointsOnDeath=false;
- local LArm,RArm,LLeg,RLeg,torso,head,LUA,LLA,LH,RUA,RLA,RH,LUL,LLL,LF,RUL,RLL,RF,UT,LT=
- model:FindFirstChild'Left Arm',model:FindFirstChild'Right Arm',model:FindFirstChild
- 'Left Leg',model:FindFirstChild'Right Leg',model:FindFirstChild'Torso',model:
- FindFirstChild'Head',model:FindFirstChild'LeftUpperArm',model:FindFirstChild'LeftLowerArm',
- model:FindFirstChild'LeftHand',model:FindFirstChild'RightUpperArm',model:FindFirstChild
- 'RightLowerArm',model:FindFirstChild'RightHand',model:FindFirstChild'LeftUpperLeg',model:
- FindFirstChild'LeftLowerLeg',model:FindFirstChild'LeftFoot',model:FindFirstChild
- 'RightUpperLeg',model:FindFirstChild'RightLowerLeg',model:FindFirstChild'RightFoot',model:
- FindFirstChild'UpperTorso',model:FindFirstChild'LowerTorso';
- local Set={{{LArm;{Orientation=Vector3.new(0,180,0);Position=Vector3.new(-1,1,0)};
- {Orientation=Vector3.new(0,180,0);Position=Vector3.new(.5,1,0)};{LimitsEnabled=true;
- UpperAngle=15;TwistLimitsEnabled=true;UpperAngle=-45;TwistLowerAngle=-45;};};{RArm;
- {Orientation=Vector3.new(0,0,0);Position=Vector3.new(1,1,0);};{Orientation=
- Vector3.new(0,0,0);Position=Vector3.new(-.5,1,0);};{LimitsEnabled=true;UpperAngle=15;
- TwistLimitsEnabled=true;UpperAngle=-45;TwistLowerAngle=-45;};};{RLeg;{Orientation=
- Vector3.new(90,0,-90);Position=Vector3.new(.5,-1,0);};{Orientation=Vector3.new(90,0,-90);
- Position=Vector3.new(0,1,0);};{LimitsEnabled=true;UpperAngle=165;};};{LLeg;{Orientation=
- Vector3.new(90,0,-90);Position=Vector3.new(-.5,-1,0);};{Orientation=Vector3.new(90,0,-90);
- Position=Vector3.new(0,1,0);};{LimitsEnabled=true;UpperAngle=165;};};{head;{Orientation=
- Vector3.new(180,90,0);Position=Vector3.new(0,1,0);};{Orientation=Vector3.new(180,90,0);
- Position=Vector3.new(0,-.5,0);};{LimitsEnabled=true;UpperAngle=75;TwistLimitsEnabled=true;
- UpperAngle=-45;TwistLowerAngle=-45};};};{{LF;LLL;'LeftAnkleRigAttachment';};{LLL;LUL;
- 'LeftKneeRigAttachment';};{LUL;LT;'LeftHipRigAttachment';};{RF;RLL;'RightAnkleRigAttachment'
- ;};{RLL;RUL;'RightKneeRigAttachment';};{RUL;LT;'RightHipRigAttachment';};{LH;LLA;
- 'LeftWristRigAttachment';};{LLA;LUA;'LeftElbowRigAttachment';};{LUA;UT;
- 'LeftShoulderAttachment';'LeftCollarAttachment'};{RH;RLA;'RightWristRigAttachment';};{RLA;
- RUA;'RightElbowRigAttachment';};{RUA;UT;'RightShoulderAttachment';'RightCollarAttachment'};
- {LT;UT;'WaistRigAttachment'};{UT;head;'NeckRigAttachment';nil;{LimitsEnabled=true;
- UpperAngle=-75;TwistLimitsEnabled=true;UpperAngle=-45;TwistLowerAngle=-45;};};};};
- hum.Died:Connect(function()for _,a in pairs(model:GetDescendants())do if a:IsA'Motor6D'then
- a:Destroy();end;end;if hum.RigType==Enum.HumanoidRigType.R6 then for _,a in pairs(Set[1])do
- local b,c;if torso then a[2].Parent,a[2].Orientation=torso,a[2].Orientation+torso.Orientation;
- b=Instance_2('Attachment',a[2]);end;if a[1]then
- a[3].Parent,a[3].Orientation=a[1],a[3].Orientation+a[1].Orientation;
- c=Instance_2('Attachment',a[3])end;a[4].Parent,a[4].Attachment0,a[4].Attachment1=torso,b,c;
- Instance_2('BallSocketConstraint',a[4])end;else for _,a in pairs(Set[2])do local b=a[5]or{};
- if a[1]then b.Attachment0=a[1][a[3]];end;if a[2]then b.Attachment1=a[2][a[4]or a[3]];end;
- b.Parent=UT;Instance_2('BallSocketConstraint',b);end;end;end);
- end;
- for _,a in pairs(workspace:GetChildren())do
- Ragdoll_v2(a)
- end;
- workspace.ChildAdded:Connect(Ragdoll_v2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement