Advertisement
istealscripts

R to Ragdollify (Made by Rufus14)[Edited]

Mar 29th, 2018
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.32 KB | None | 0 0
  1. --By Rufus14
  2. ragdolld = false
  3. mouse = game.Players.LocalPlayer:GetMouse()
  4. function ragdoll(key)
  5.     key = key:lower()
  6.     if key == "r" and not ragdolld then
  7.         ragdolld = true
  8.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  9.         game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
  10.         game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  11.         if game.Players.LocalPlayer.Character:findFirstChild("Torso") then
  12.             game.Players.LocalPlayer.Character.Torso.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10
  13.             for i,v in pairs(game.Players.LocalPlayer.Character.Torso:GetChildren()) do
  14.                 if v.ClassName == "Motor6D" then
  15.                     if v.Name == "Neck" then
  16.                        
  17.                     else
  18.                         v:destroy()
  19.                     end
  20.                 end
  21.             end
  22.         end
  23.         if game.Players.LocalPlayer.Character:findFirstChild("Right Arm") then
  24.             local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  25.             attachment.Position = Vector3.new(1, 1, 0)
  26.             local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  27.             ball.Attachment0 = game.Players.LocalPlayer.Character["Right Arm"].RightShoulderAttachment
  28.             ball.Attachment1 = attachment
  29.             local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  30.             collidepartofleftleg.Name = "Bone"
  31.             collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  32.             collidepartofleftleg.Transparency = 1
  33.             collidepartofleftleg:BreakJoints()
  34.             local weeld = Instance.new("Weld", collidepartofleftleg)
  35.             weeld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  36.             weeld.Part1 = collidepartofleftleg
  37.             weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  38.         end
  39.         if game.Players.LocalPlayer.Character:findFirstChild("Left Arm") then
  40.             local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  41.             attachment.Position = Vector3.new(-1, 1, 0)
  42.             local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  43.             ball.Attachment0 = attachment
  44.             ball.Attachment1 = game.Players.LocalPlayer.Character["Left Arm"].LeftShoulderAttachment
  45.             local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  46.             collidepartofleftleg.Name = "Bone"
  47.             collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  48.             collidepartofleftleg.Transparency = 1
  49.             collidepartofleftleg:BreakJoints()
  50.             local weeld = Instance.new("Weld", collidepartofleftleg)
  51.             weeld.Part0 = game.Players.LocalPlayer.Character["Left Arm"]
  52.             weeld.Part1 = collidepartofleftleg
  53.             weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  54.         end
  55.         if game.Players.LocalPlayer.Character:findFirstChild("Right Leg") then
  56.             local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  57.             attachment.Position = Vector3.new(0.5, -1, 0)
  58.             local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  59.             ball.Attachment0 = game.Players.LocalPlayer.Character["Right Leg"].RightFootAttachment
  60.             ball.Attachment1 = attachment
  61.             game.Players.LocalPlayer.Character["Right Leg"].RightFootAttachment.Position = Vector3.new(0, 1, 0)
  62.             local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  63.             collidepartofleftleg.Name = "Bone"
  64.             collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  65.             collidepartofleftleg.Transparency = 1
  66.             collidepartofleftleg:BreakJoints()
  67.             local weeld = Instance.new("Weld", collidepartofleftleg)
  68.             weeld.Part0 = game.Players.LocalPlayer.Character["Right Leg"]
  69.             weeld.Part1 = collidepartofleftleg
  70.             weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  71.         end
  72.         if game.Players.LocalPlayer.Character:findFirstChild("Left Leg") then
  73.             local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Torso)
  74.             attachment.Position = Vector3.new(-0.5, -1, 0)
  75.             local ball = Instance.new("BallSocketConstraint", game.Players.LocalPlayer.Character)
  76.             ball.Attachment0 = game.Players.LocalPlayer.Character["Left Leg"].LeftFootAttachment
  77.             ball.Attachment1 = attachment
  78.             game.Players.LocalPlayer.Character["Left Leg"].LeftFootAttachment.Position = Vector3.new(0, 1, 0)
  79.             local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  80.             collidepartofleftleg.Name = "Bone"
  81.             collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  82.             collidepartofleftleg.Transparency = 1
  83.             collidepartofleftleg:BreakJoints()
  84.             local weeld = Instance.new("Weld", collidepartofleftleg)
  85.             weeld.Part0 = game.Players.LocalPlayer.Character["Left Leg"]
  86.             weeld.Part1 = collidepartofleftleg
  87.             weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  88.         end
  89.         if game.Players.LocalPlayer.Character:findFirstChild("Head") then
  90.             local attachment = Instance.new("Attachment", game.Players.LocalPlayer.Character.Head)
  91.             attachment.Position = Vector3.new(0, -0.5, 0)
  92.             attachment.Name = "lol"
  93.             attachment.Visible = false
  94.             game.Players.LocalPlayer.Character.Torso.NeckAttachment.Visible = false
  95.             game.Players.LocalPlayer.Character.Torso.NeckAttachment.Position = game.Players.LocalPlayer.Character.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  96.             local ball = Instance.new("HingeConstraint", game.Players.LocalPlayer.Character)
  97.             ball.Attachment0 = game.Players.LocalPlayer.Character.Torso.NeckAttachment
  98.             ball.Attachment1 = attachment
  99.             local collidepartofleftleg = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  100.             collidepartofleftleg.Name = "Bone"
  101.             collidepartofleftleg.Size = Vector3.new(0.5,0.3,0.5)
  102.             collidepartofleftleg.Transparency = 1
  103.             collidepartofleftleg:BreakJoints()
  104.             local weeld = Instance.new("Weld", collidepartofleftleg)
  105.             weeld.Part0 = collidepartofleftleg
  106.             weeld.Part1 = game.Players.LocalPlayer.Character["Head"]
  107.             if game.Players.LocalPlayer.Character.Torso:findFirstChild("Neck") then
  108.                 game.Players.LocalPlayer.Character.Torso.Neck:destroy()
  109.             end
  110.         end
  111.         if game.Players.LocalPlayer.Character:findFirstChild("Head") then
  112.             workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Head
  113.             local aah = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  114.             if aah then
  115.                 aah.Volume = 8
  116.                 local aahmath = math.random(2,8)
  117.                 if aahmath == 2 then
  118.                     aah.SoundId = "rbxassetid://157946858"
  119.                     aah:Play()
  120.                 end
  121.                 if aahmath == 3 then
  122.                     aah.SoundId = "rbxassetid://609158214"
  123.                     aah.TimePosition = 0.3
  124.                     aah:Play()
  125.                 end
  126.                 if aahmath == 4 then
  127.                     aah.SoundId = "rbxassetid://138161538"
  128.                     aah:Play()
  129.                 end
  130.                 if aahmath == 5 then
  131.                     aah.SoundId = "rbxassetid://328728034"
  132.                     aah:Play()
  133.                 end
  134.                 if aahmath == 6 then
  135.                     aah.SoundId = "rbxassetid://158972271"
  136.                     aah.TimePosition = 2.5
  137.                     aah:Play()
  138.                 end
  139.                 if aahmath == 7 then
  140.                     aah.SoundId = "rbxassetid://235854672"
  141.                     aah.TimePosition = 1.3
  142.                     aah:Play()
  143.                 end
  144.                 if aahmath == 8 then
  145.                     aah.SoundId = "rbxassetid://626777433"
  146.                     aah.TimePosition = 1.4
  147.                     aah:Play()
  148.                 end
  149.             end
  150.         end
  151.     end
  152. end
  153. mouse.KeyDown:connect(ragdoll)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement