TheUnknownDiscord

perm ragdoll

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