Advertisement
InTesting

Ragdoll Slide

Nov 30th, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.96 KB | None | 0 0
  1. local function Instance_2(a,b)local c=Instance.new(a);for d,e in pairs(b)do  
  2. pcall(function()c[d]=e;end);end;return c;end;
  3. local function Union(a,b,c)if not a or not b then return;end;if typeof(b)=='Instance'then
  4. b={b};end;local d={a};table.foreach(b,function(_,e)table.insert(d,e);end);for _,e in pairs(d)do
  5. (function()if type(e)=='boolean'then return;end;
  6. for _,f in pairs({'Material';'Color';'Reflectance';'Transparency'})do e[f]=a[f];end;
  7. d.Anchored=true;d.CanCollide=false;d.Massless=true;end)();end;
  8. local e=(c and a:SubtractAsync(b))or a:UnionAsync(b);for _,f in pairs(d)do
  9. if typeof(f)=='Instance'then f:Destroy();end;end;return e;end;
  10.  
  11. print'https://pastebin.com/raw/5QSqffmx';
  12. local function Instance_2(c,p)if not c then return;end;p=p or {};
  13. local a=Instance.new(c,p.Parent);for b,c in pairs(p)do local _,d= pcall(function()a[b]=c;end);
  14. if d then print(d);end;end;return a;end;
  15. local function Ragdoll_v2(model)local hum=model:FindFirstChildWhichIsA'Humanoid';if not hum then
  16.     return;end;hum.BreakJointsOnDeath=false;
  17.     local LArm,RArm,LLeg,RLeg,torso,head,LUA,LLA,LH,RUA,RLA,RH,LUL,LLL,LF,RUL,RLL,RF,UT,LT=
  18.         model:FindFirstChild'Left Arm',model:FindFirstChild'Right Arm',model:FindFirstChild
  19.         'Left Leg',model:FindFirstChild'Right Leg',model:FindFirstChild'Torso',model:
  20.         FindFirstChild'Head',model:FindFirstChild'LeftUpperArm',model:FindFirstChild'LeftLowerArm',
  21.         model:FindFirstChild'LeftHand',model:FindFirstChild'RightUpperArm',model:FindFirstChild
  22.         'RightLowerArm',model:FindFirstChild'RightHand',model:FindFirstChild'LeftUpperLeg',model:
  23.         FindFirstChild'LeftLowerLeg',model:FindFirstChild'LeftFoot',model:FindFirstChild
  24.         'RightUpperLeg',model:FindFirstChild'RightLowerLeg',model:FindFirstChild'RightFoot',model:
  25.         FindFirstChild'UpperTorso',model:FindFirstChild'LowerTorso';
  26.     local Set={{{LArm;{Orientation=Vector3.new(0,180,0);Position=Vector3.new(-1,1,0)};
  27.     {Orientation=Vector3.new(0,180,0);Position=Vector3.new(.5,1,0)};{LimitsEnabled=true;
  28.     UpperAngle=15;TwistLimitsEnabled=true;UpperAngle=-45;TwistLowerAngle=-45;};};{RArm;
  29.     {Orientation=Vector3.new(0,0,0);Position=Vector3.new(1,1,0);};{Orientation=
  30.     Vector3.new(0,0,0);Position=Vector3.new(-.5,1,0);};{LimitsEnabled=true;UpperAngle=15;
  31.     TwistLimitsEnabled=true;UpperAngle=-45;TwistLowerAngle=-45;};};{RLeg;{Orientation=
  32.     Vector3.new(90,0,-90);Position=Vector3.new(.5,-1,0);};{Orientation=Vector3.new(90,0,-90);
  33.     Position=Vector3.new(0,1,0);};{LimitsEnabled=true;UpperAngle=165;};};{LLeg;{Orientation=
  34.     Vector3.new(90,0,-90);Position=Vector3.new(-.5,-1,0);};{Orientation=Vector3.new(90,0,-90);
  35.     Position=Vector3.new(0,1,0);};{LimitsEnabled=true;UpperAngle=165;};};{head;{Orientation=
  36.     Vector3.new(180,90,0);Position=Vector3.new(0,1,0);};{Orientation=Vector3.new(180,90,0);
  37.     Position=Vector3.new(0,-.5,0);};{LimitsEnabled=true;UpperAngle=75;TwistLimitsEnabled=true;
  38.     UpperAngle=-45;TwistLowerAngle=-45};};};{{LF;LLL;'LeftAnkleRigAttachment';};{LLL;LUL;
  39.     'LeftKneeRigAttachment';};{LUL;LT;'LeftHipRigAttachment';};{RF;RLL;'RightAnkleRigAttachment'
  40.     ;};{RLL;RUL;'RightKneeRigAttachment';};{RUL;LT;'RightHipRigAttachment';};{LH;LLA;
  41.     'LeftWristRigAttachment';};{LLA;LUA;'LeftElbowRigAttachment';};{LUA;UT;
  42.     'LeftShoulderAttachment';'LeftCollarAttachment'};{RH;RLA;'RightWristRigAttachment';};{RLA;
  43.     RUA;'RightElbowRigAttachment';};{RUA;UT;'RightShoulderAttachment';'RightCollarAttachment'};
  44.     {LT;UT;'WaistRigAttachment'};{UT;head;'NeckRigAttachment';nil;{LimitsEnabled=true;
  45.     UpperAngle=-75;TwistLimitsEnabled=true;UpperAngle=-45;TwistLowerAngle=-45;};};};};
  46.     hum.Died:Connect(function()for _,a in pairs(model:GetDescendants())do if a:IsA'Motor6D'then
  47.     a:Destroy();end;end;if hum.RigType==Enum.HumanoidRigType.R6 then for _,a in pairs(Set[1])do
  48.     local b,c;if torso then a[2].Parent,a[2].Orientation=torso,a[2].Orientation+torso.Orientation;
  49.     b=Instance_2('Attachment',a[2]);end;if a[1]then
  50.     a[3].Parent,a[3].Orientation=a[1],a[3].Orientation+a[1].Orientation;
  51.     c=Instance_2('Attachment',a[3])end;a[4].Parent,a[4].Attachment0,a[4].Attachment1=torso,b,c;
  52.     Instance_2('BallSocketConstraint',a[4])end;else for _,a in pairs(Set[2])do local b=a[5]or{};
  53.     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;
  54.     b.Parent=UT;Instance_2('BallSocketConstraint',b);end;end;end);  
  55. end;
  56. for _,a in pairs(workspace:GetChildren())do
  57.     Ragdoll_v2(a)
  58. end;
  59. workspace.ChildAdded:Connect(Ragdoll_v2)
  60. local name_number_1=0
  61. local function Slide_Time()name_number_1=name_number_1+1;local Object_0=Instance_2("Model",{
  62. Parent=workspace;Name='Slide_'..name_number_1});local Object_1=Instance_2("Part",{Color=
  63. Color3.new(0,1,0);CFrame=CFrame.new(-35,1,-4,1,0,0,0,1,0,0,0,1);Parent=Object_0;Anchored=
  64. true;Shape='Ball';Material='ForceField';Size=Vector3.new(2,2,2);});
  65. local Object_1_1=Instance_2("ClickDetector",{Parent=Object_1;MaxActivationDistance=4});
  66. local Object_2=Instance_2("Model",{Parent=Object_0;});
  67. Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-32.5,27,-6.5,
  68. 0,1,0,-1,0,0,0,0,1);Parent=Object_2;Anchored=true;Shape='Cylinder';Material='Wood';Size=
  69. Vector3.new(54,1,1);});Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);CFrame=
  70. CFrame.new(-32.5,27,-1.5,0,1,0,-1,0,0,0,0,1);Parent=Object_2;Anchored=true;Shape=
  71. 'Cylinder';Material='Wood';Size=Vector3.new(54,1,1);});Instance_2("Part",{Color=
  72. Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-37.5,27,-1.5,0,1,0,-1,0,0,0,0,1);
  73. Parent=Object_2;Anchored=true;Shape='Cylinder';Material='Wood';Size=Vector3.new(54,1,1);
  74. });Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-37.5,
  75. 27,-6.5,0,1,0,-1,0,0,0,0,1);Parent=Object_2;Anchored=true;Shape='Cylinder';Material=
  76. 'Wood';Size=Vector3.new(54,1,1);});Instance_2("Part",{Color=Color3.new(.627451,.372549,
  77. .207843);CFrame=CFrame.new(-35,50.4875183,-4,1,0,0,0,1,0,0,0,1);Parent=Object_2;Anchored=
  78. true;Material='Wood';Size=Vector3.new(6,1,6);});Instance_2("Part",{Color=Color3.new(.627451,
  79. .372549,.207843);CFrame=CFrame.new(-35,52.4875183,-1.5,1,0,0,0,1,0,0,0,1);Parent=Object_2;
  80. Anchored=true;Shape='Cylinder';Material='Wood';Size=Vector3.new(6,1,1);});Instance_2("Part",{
  81. Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-35,52.4875183,-6.5,1,0,0,0,1,0,
  82. 0,0,1);Parent=Object_2;Anchored=true;Shape='Cylinder';Material='Wood';Size=Vector3.new(6,1,1)
  83. ;});Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-32.5,
  84. 52.4875183,-4,0,0,1,0,1,0,-1,0,0);Parent=Object_2;Anchored=true;Shape='Cylinder';Material=
  85. 'Wood';Size=Vector3.new(6,1,1);});Instance_2("Part",{Color=Color3.new(.627451,.372549,
  86. .207843);CFrame=CFrame.new(-46.7175217,43.8913193,-7.5,.707106829,-.707106829,0,.707106829,
  87. .707106829,0,0,0,1);Parent=Object_2;Anchored=true;Material='Wood';Size=Vector3.new(22,2,1);});
  88. Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-55.6568604,
  89. 27.830658,0,0,0,1,.707106829,.707106829,0,-.707106829,.707106829,0);Parent=Object_2;Anchored=
  90. true;Material='Wood';Size=Vector3.new(22,1,8);});Instance_2("Part",{Color=Color3.new(.627451,
  91. .372549,.207843);CFrame=CFrame.new(-47.8284302,10.0022278,11,-.707106829,.707106829,0,
  92. .707106829,.707106829,0,0,0,-1);Parent=Object_2;Anchored=true;Material='Wood';Size=Vector3.
  93. new(30,1,8);});Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.
  94. new(-45.6568604,42.830658,-4,.707106829,-.707106829,0,.707106829,.707106829,0,0,0,1);Parent=
  95. Object_2;Anchored=true;Material='Wood';Size=Vector3.new(22,1,8);});Instance_2("Part",{Color=
  96. Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-46.7175217,43.8913193,-.5,.707106829,
  97. -.707106829,0,.707106829,.707106829,0,0,0,1);Parent=Object_2;Anchored=true;Material='Wood';
  98. Size=Vector3.new(22,2,1);});Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);
  99. CFrame=CFrame.new(-59.1568604,28.8913193,1.06065965,0,0,1,.707106829,.707106829,0,
  100. -.707106829,.707106829,0);Parent=Object_2;Anchored=true;Material='Wood';Size=Vector3.new(
  101. 22,2,1);});Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(
  102. -52.1568604,28.8913193,1.06065965,0,0,1,.707106829,.707106829,0,-.707106829,.707106829,0);
  103. Parent=Object_2;Anchored=true;Material='Wood';Size=Vector3.new(22,2,1);});Instance_2("Part",{
  104. Color=Color3.new(.627451,.372549,.207843);CFrame=CFrame.new(-45,9.29511833,7.5,-.707106829,
  105. .707106829,0,.707106829,.707106829,0,0,0,-1);Parent=Object_2;Anchored=true;Material='Wood';
  106. Size=Vector3.new(29,2,1);});Instance_2("Part",{Color=Color3.new(.627451,.372549,.207843);
  107. CFrame=CFrame.new(-46.0606613,10.3557796,14.5,-.707106829,.707106829,0,.707106829,
  108. .707106829,0,0,0,-1);Parent=Object_2;Anchored=true;Material='Wood';Size=Vector3.new(32,2,1);});
  109.     Object_1_1.MouseClick:Connect(function(a)
  110.         if not a then return;end;
  111.         local b=a.Character;
  112.         if not b then return;end;
  113.         local c=b:FindFirstChild'HumanoidRootPart';
  114.         if not c then return;end;
  115.         c.CFrame=c.CFrame*CFrame.new(0,55,0)
  116.     end)
  117. end;
  118. Slide_Time();workspace.ChildRemoved:Connect(function(a)if a.Name:sub(1,6)=='Slide_'then
  119. Slide_Time();end;end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement