TheUnknownDiscord

funnyragdoll

Aug 26th, 2021 (edited)
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local bodyhit = Instance.new("Sound", owner.Character.Torso)
  2.                 bodyhit.SoundId = "rbxassetid://220025741"
  3.                 bodyhit.Volume = 2
  4.  
  5. local isragdoll = false
  6.  
  7.             local limbcollider = Instance.new("Part", owner.Character:findFirstChild("Right Arm"))
  8.                 limbcollider.Size = Vector3.new(1.4,1,1)
  9.                 limbcollider.Shape = "Cylinder"
  10.                 limbcollider.Transparency = 1
  11.                 limbcollider.Name = "LimbCollider"
  12.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  13.                 limbcolliderweld.Part0 = owner.Character:findFirstChild("Right Arm")
  14.                 limbcolliderweld.Part1 = limbcollider
  15.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  16.             local limbcollider2 = Instance.new("Part", owner.Character:findFirstChild("Left Arm"))
  17.                 limbcollider2.Size = Vector3.new(1.4,1,1)
  18.                 limbcollider2.Shape = "Cylinder"
  19.                 limbcollider2.Transparency = 1
  20.                 limbcollider2.Name = "LimbCollider"
  21.                 local limbcolliderweld2 = Instance.new("Weld", limbcollider)
  22.                 limbcolliderweld2.Part0 = owner.Character:findFirstChild("Left Arm")
  23.                 limbcolliderweld2.Part1 = limbcollider2
  24.                 limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  25.             local limbcollider3 = Instance.new("Part", owner.Character:findFirstChild("Right Leg"))
  26.                 limbcollider3.Size = Vector3.new(1.3,1,1)
  27.                 limbcollider3.Shape = "Cylinder"
  28.                 limbcollider3.Transparency = 1
  29.                 limbcollider3.Name = "LimbCollider"
  30.                 local limbcolliderweld3 = Instance.new("Weld", limbcollider)
  31.                 limbcolliderweld3.Part0 = owner.Character:findFirstChild("Right Leg")
  32.                 limbcolliderweld3.Part1 = limbcollider3
  33.                 limbcolliderweld3.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  34.             local limbcollider4 = Instance.new("Part", owner.Character:findFirstChild("Left Leg"))
  35.                 limbcollider4.Size = Vector3.new(1.3,1,1)
  36.                 limbcollider4.Shape = "Cylinder"
  37.                 limbcollider4.Transparency = 1
  38.                 limbcollider4.Name = "LimbCollider"
  39.                 local limbcolliderweld4 = Instance.new("Weld", limbcollider)
  40.                 limbcolliderweld4.Part0 = owner.Character:findFirstChild("Left Leg")
  41.                 limbcolliderweld4.Part1 = limbcollider4
  42.                 limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  43.             local limbcollider5 = Instance.new("Part", owner.Character.Head)
  44.                 limbcollider5.Size = Vector3.new(1,1,1)
  45.                 limbcollider5.Shape = "Cylinder"
  46.                 limbcollider5.Transparency = 1
  47.                 limbcollider5.Name = "LimbCollider"
  48.                 local limbcolliderweld5 = Instance.new("Weld", limbcollider)
  49.                 limbcolliderweld5.Part0 = owner.Character.Head
  50.                 limbcolliderweld5.Part1 = limbcollider5
  51.                 limbcolliderweld5.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(0,0,0)
  52.  
  53. function killfunction(part)
  54. if owner.Character.HumanoidRootPart.Velocity.x <= -17 or owner.Character.HumanoidRootPart.Velocity.x >= 17 or owner.Character.HumanoidRootPart.Velocity.z <= -17 or owner.Character.HumanoidRootPart.Velocity.z >= 17 then
  55. if not isragdoll then  
  56. isragdoll = true
  57. bodyhit:Play()
  58.     for i,v in pairs(owner.Character:GetDescendants()) do
  59.         if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
  60.             local Socket = Instance.new("BallSocketConstraint")
  61.             local a1 = Instance.new("Attachment")
  62.             local a2 = Instance.new("Attachment")
  63.             a1.Parent = v.Part0
  64.             a2.Parent = v.Part1
  65.             Socket.Parent = v.Parent
  66.             Socket.Attachment0 = a1
  67.             Socket.Attachment1 = a2
  68.             a1.CFrame = v.C0
  69.             a2.CFrame = v.C1
  70.             Socket.LimitsEnabled = false
  71.             Socket.TwistLimitsEnabled = true
  72.             v:Destroy()
  73.         end
  74.     end
  75. end
  76.     owner.Character.Humanoid.RequiresNeck = false
  77. owner.Character.Humanoid.PlatformStand = true
  78. wait(2.5)
  79.     for i,v in pairs(owner.Character:GetDescendants()) do
  80.         if v:IsA("BallSocketConstraint") then
  81.             v.UpperAngle = 0
  82.             v.TwistUpperAngle = 0
  83.             v.TwistLowerAngle = 0
  84.             local Joints = Instance.new("Motor6D",v.Parent)
  85.             Joints.Part0 = v.Attachment0.Parent
  86.             Joints.Part1 = v.Attachment1.Parent
  87.             Joints.C0 = v.Attachment0.CFrame
  88.             Joints.C1 = v.Attachment1.CFrame
  89. owner.Character.HumanoidRootPart.CFrame = owner.Character.HumanoidRootPart.CFrame + Vector3.new(0,2,0)
  90.             v:Destroy()
  91.         end
  92.     end
  93. owner.Character.Humanoid.PlatformStand = false
  94. wait(0.5)
  95. isragdoll = false
  96. end
  97. end
  98. for i,v in pairs(owner.Character:GetDescendants()) do
  99. if v:IsA("BasePart") then
  100. v.Touched:connect(killfunction)
  101. end
  102. end
Add Comment
Please, Sign In to add comment