Advertisement
Guest User

Weird Ragdoll Script

a guest
Apr 29th, 2018
4,955
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.15 KB | None | 0 0
  1. --By Rufus14 (FINALLY I KNOW HOW TO MAKE A RAGDOLL :D)
  2. --PRESS "R" TO RAGDOLLIFY
  3. mouse = game.Players.LocalPlayer:GetMouse()
  4. using = false
  5. ragdolling = false
  6. hit = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  7. hit.SoundId = "rbxassetid://1542642349"
  8. hit.Volume = 2
  9. hit1 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  10. hit1.SoundId = "rbxassetid://1542642349"
  11. hit1.Volume = 2
  12. hit2 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  13. hit2.SoundId = "rbxassetid://1542642349"
  14. hit2.Volume = 2
  15. hit3 = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  16. hit3.SoundId = "rbxassetid://1542642349"
  17. hit3.Volume = 2
  18. hit3.TimePosition = 0.33
  19.  
  20. stand = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  21. stand.SoundId = "rbxassetid://162456532"
  22. stand.Volume = 3
  23.  
  24. print("Press R to ragdollify")
  25. function respawn(key)
  26. key = key:lower()
  27. if key == "t" then
  28. stand:Play()
  29. if ragdolling then
  30. ragdolling = false
  31. lshclone.Parent = game.Players.LocalPlayer.Character.Torso
  32. glue:destroy()
  33. rshclone.Parent = game.Players.LocalPlayer.Character.Torso
  34. glue1:destroy()
  35. lhclone.Parent = game.Players.LocalPlayer.Character.Torso
  36. glue11:destroy()
  37. rhclone.Parent = game.Players.LocalPlayer.Character.Torso
  38. glue111:destroy()
  39. collider:destroy()
  40. collider1:destroy()
  41. collider11:destroy()
  42. collider111:destroy()
  43. sensoring:destroy()
  44. sensoring1:destroy()
  45. game.Players.LocalPlayer.Character.Torso.SpotLight:destroy()
  46. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
  47. end
  48. end
  49. end
  50. mouse.KeyDown:connect(respawn)
  51. function ragdoll(key)
  52. key = key:lower()
  53. if key == "r" then
  54. if not ragdolling then
  55. ragdolling = true
  56. local light = Instance.new("SpotLight", game.Players.LocalPlayer.Character.Torso)
  57. game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
  58. lshclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  59. rshclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  60. lhclone = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
  61. rhclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  62. local leftarm = game.Players.LocalPlayer.Character["Left Arm"]
  63. local rightrm = game.Players.LocalPlayer.Character["Right Arm"]
  64. local leftleg = game.Players.LocalPlayer.Character["Left Leg"]
  65. local rightleg = game.Players.LocalPlayer.Character["Right Leg"]
  66. game.Players.LocalPlayer.Character.Torso["Left Hip"]:destroy()
  67. local head = game.Players.LocalPlayer.Character.Head
  68. glue = Instance.new("Glue", game.Players.LocalPlayer.Character.Torso)
  69. glue.Part0 = game.Players.LocalPlayer.Character.Torso
  70. glue.Part1 = leftleg
  71. glue.Name = "Left leg"
  72. collider = Instance.new("Part", leftleg)
  73. collider.Position = Vector3.new(0,999,0)
  74. collider.Size = Vector3.new(1.5, 1, 1)
  75. collider.Shape = "Cylinder"
  76. local weld = Instance.new("Weld", collider)
  77. weld.Part0 = leftleg
  78. weld.Part1 = collider
  79. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  80. collider.TopSurface = "Smooth"
  81. collider.BottomSurface = "Smooth"
  82. collider.formFactor = "Symmetric"
  83. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  84. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  85. collider.Transparency = 1
  86. ------------
  87. game.Players.LocalPlayer.Character.Torso["Right Hip"]:destroy()
  88. glue1 = Instance.new("Glue", game.Players.LocalPlayer.Character.Torso)
  89. glue1.Part0 = game.Players.LocalPlayer.Character.Torso
  90. glue1.Part1 = rightleg
  91. glue1.Name = "Right leg"
  92. collider1 = Instance.new("Part", rightleg)
  93. collider1.Position = Vector3.new(0,9999,0)
  94. collider1.Size = Vector3.new(1.5, 1, 1)
  95. collider1.Shape = "Cylinder"
  96. local weld1 = Instance.new("Weld", collider1)
  97. weld1.Part0 = rightleg
  98. weld1.Part1 = collider1
  99. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  100. collider1.TopSurface = "Smooth"
  101. collider1.BottomSurface = "Smooth"
  102. collider1.formFactor = "Symmetric"
  103. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  104. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  105. collider1.Transparency = 1
  106. ------------
  107. game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:destroy()
  108. glue11 = Instance.new("Glue", game.Players.LocalPlayer.Character.Torso)
  109. glue11.Part0 = game.Players.LocalPlayer.Character.Torso
  110. glue11.Part1 = rightrm
  111. glue11.Name = "Right shoulder"
  112. collider11 = Instance.new("Part", rightrm)
  113. collider11.Position = Vector3.new(0,9999,0)
  114. collider11.Size = Vector3.new(1.8,1,1)
  115. collider11.Shape = "Cylinder"
  116. local weld11 = Instance.new("Weld", collider11)
  117. weld11.Part0 = rightrm
  118. weld11.Part1 = collider11
  119. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  120. collider11.TopSurface = "Smooth"
  121. collider11.BottomSurface = "Smooth"
  122. collider11.formFactor = "Symmetric"
  123. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  124. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  125. collider11.Transparency = 1
  126. ------------
  127. game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:destroy()
  128. glue111 = Instance.new("Glue", game.Players.LocalPlayer.Character.Torso)
  129. glue111.Part0 = game.Players.LocalPlayer.Character.Torso
  130. glue111.Part1 = leftarm
  131. glue111.Name = "Left shoulder"
  132. collider111 = Instance.new("Part", leftarm)
  133. collider111.Position = Vector3.new(0,9999,0)
  134. collider111.Size = Vector3.new(1.5, 1, 1)
  135. collider111.Shape = "Cylinder"
  136. local weld111 = Instance.new("Weld", collider111)
  137. weld111.Part0 = leftarm
  138. weld111.Part1 = collider111
  139. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  140. collider111.TopSurface = "Smooth"
  141. collider111.BottomSurface = "Smooth"
  142. collider111.formFactor = "Symmetric"
  143. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  144. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  145. collider111.Transparency = 1
  146. -----------------
  147. sensoring = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  148. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  149. sensoring.CanCollide = false
  150. sensoring.Position = game.Players.LocalPlayer.Character.Torso.Position
  151. local welder = Instance.new("Weld", sensoring)
  152. welder.Part0 = game.Players.LocalPlayer.Character.Torso
  153. welder.Part1 = sensoring
  154. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  155. sensoring.Transparency = 1
  156. -----------------
  157. sensoring1 = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  158. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  159. sensoring1.CanCollide = false
  160. sensoring1.Position = game.Players.LocalPlayer.Character.Torso.Position
  161. local welder1 = Instance.new("Weld", sensoring)
  162. welder1.Part0 = game.Players.LocalPlayer.Character.Torso
  163. welder1.Part1 = sensoring1
  164. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  165. sensoring1.Transparency = 1
  166. local function touch()
  167. if not using then
  168. using = true
  169. local Math = math.random(1,4)
  170. if Math == 1 then
  171. hit:Play()
  172. end
  173. if Math == 2 then
  174. hit1:Play()
  175. end
  176. if Math == 3 then
  177. hit2:Play()
  178. end
  179. if Math == 4 then
  180. hit3:Play()
  181. end
  182. wait(0.1)
  183. using = false
  184. end
  185. end
  186. sensoring.Touched:connect(touch)
  187. sensoring1.Touched:connect(touch)
  188. end
  189.  
  190. end
  191. end
  192. mouse.KeyDown:connect(ragdoll)
  193. --di ent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement