Mr-Shadow_Cat

Ragdoll

Feb 22nd, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 KB | None | 0 0
  1. wait()
  2. script.Parent = nil
  3. function ragdoll()
  4. game.Players.LocalPlayer.Character.Archivable = true
  5. clone = game.Players.LocalPlayer.Character:Clone()
  6. clone.Parent = workspace
  7. for i,v in pairs(clone:GetChildren()) do
  8. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  9. v:Remove()
  10. end
  11. for i,p in pairs(v:GetChildren()) do
  12. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  13. p:Remove()
  14. end
  15. end
  16. end
  17. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  18. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  19. t:Remove()
  20. end
  21. end
  22. vel = Instance.new("BodyVelocity", clone.Torso)
  23. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  24. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  25. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  26. using = false
  27. hit = Instance.new("Sound", clone.Torso)
  28. hit.SoundId = "rbxassetid://260430060"
  29. hit.Volume = 0
  30. hit1 = Instance.new("Sound", clone.Torso)
  31. hit1.SoundId = "rbxassetid://138087186"
  32. hit1.Volume = 0
  33. hit2 = Instance.new("Sound", clone.Torso)
  34. hit2.SoundId = "rbxassetid://131237241"
  35. hit2.Volume = 0
  36. hit3 = Instance.new("Sound", clone.Torso)
  37. hit3.SoundId = "rbxassetid://278062209"
  38. hit3.Volume = 0
  39. hit3.TimePosition = 0.33
  40. ded = Instance.new("Sound", clone.Torso)
  41. ded.SoundId = "rbxassetid://418892870"
  42. ded.Volume = 0
  43. local leftarm = clone:findFirstChild("Left Arm")
  44. local rightrm = clone:findFirstChild("Right Arm")
  45. local leftleg = clone:findFirstChild("Left Leg")
  46. local rightleg = clone:findFirstChild("Right Leg")
  47. local head = clone:findFirstChild("Head")
  48. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  49. if g.ClassName == "Part" then
  50. g:destroy()
  51. end
  52. end
  53. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  54. if h.ClassName == "Accesory" then
  55. h:destroy()
  56. end
  57. end
  58. game.Workspace.CurrentCamera.CameraSubject = head
  59. if head then
  60. local attachment = Instance.new("Attachment", clone.Head)
  61. attachment.Position = Vector3.new(0, -0.5, 0)
  62. attachment.Name = "lol"
  63. attachment.Visible = false
  64. clone.Torso.NeckAttachment.Visible = false
  65. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  66. local ball = Instance.new("BallSocketConstraint", clone)
  67. ball.Attachment0 = clone.Torso.NeckAttachment
  68. ball.Attachment1 = attachment
  69. ball.LimitsEnabled = true
  70. ball.TwistLimitsEnabled = true
  71. ball.UpperAngle = 90
  72. ball.Restitution = 0.5
  73. ball.TwistUpperAngle = 90
  74. ball.TwistLowerAngle = -90
  75. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  76. collidepartofleftleg.Name = "Bone"
  77. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  78. collidepartofleftleg.Transparency = 1
  79. collidepartofleftleg:BreakJoints()
  80. local weeld = Instance.new("Weld", collidepartofleftleg)
  81. weeld.Part0 = collidepartofleftleg
  82. weeld.Part1 = clone["Head"]
  83. end
  84. if leftleg ~= nil then
  85. local glue = Instance.new("Glue", clone.Torso)
  86. glue.Part0 = clone.Torso
  87. glue.Part1 = leftleg
  88. glue.Name = "Left leg"
  89. local collider = Instance.new("Part", leftleg)
  90. collider.Position = Vector3.new(0,999,0)
  91. collider.Size = Vector3.new(1.5, 1, 1)
  92. collider.Shape = "Cylinder"
  93. local weld = Instance.new("Weld", collider)
  94. weld.Part0 = leftleg
  95. weld.Part1 = collider
  96. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  97. collider.TopSurface = "Smooth"
  98. collider.BottomSurface = "Smooth"
  99. collider.formFactor = "Symmetric"
  100. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  101. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  102. collider.Transparency = 1
  103. end
  104. ------------
  105. if rightleg ~= nil then
  106. local glue1 = Instance.new("Glue", clone.Torso)
  107. glue1.Part0 = clone.Torso
  108. glue1.Part1 = rightleg
  109. glue1.Name = "Right leg"
  110. local collider1 = Instance.new("Part", rightleg)
  111. collider1.Position = Vector3.new(0,999,0)
  112. collider1.Size = Vector3.new(1.5, 1, 1)
  113. collider1.Shape = "Cylinder"
  114. local weld1 = Instance.new("Weld", collider1)
  115. weld1.Part0 = rightleg
  116. weld1.Part1 = collider1
  117. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  118. collider1.TopSurface = "Smooth"
  119. collider1.BottomSurface = "Smooth"
  120. collider1.formFactor = "Symmetric"
  121. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  122. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  123. collider1.Transparency = 1
  124. end
  125. ------------
  126. if rightrm ~= nil then
  127. local glue11 = Instance.new("Glue", clone.Torso)
  128. glue11.Part0 = clone.Torso
  129. glue11.Part1 = rightrm
  130. glue11.Name = "Right shoulder"
  131. local collider11 = Instance.new("Part", rightrm)
  132. collider11.Position = Vector3.new(0,9999,0)
  133. collider11.Size = Vector3.new(1.5,1,1)
  134. collider11.Shape = "Cylinder"
  135. local weld11 = Instance.new("Weld", collider11)
  136. weld11.Part0 = rightrm
  137. weld11.Part1 = collider11
  138. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  139. collider11.TopSurface = "Smooth"
  140. collider11.BottomSurface = "Smooth"
  141. collider11.formFactor = "Symmetric"
  142. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  143. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  144. collider11.Transparency = 1
  145. end
  146. ------------
  147. if leftarm ~= nil then
  148. local glue111 = Instance.new("Glue", clone.Torso)
  149. glue111.Part0 = clone.Torso
  150. glue111.Part1 = leftarm
  151. glue111.Name = "Left shoulder"
  152. local collider111 = Instance.new("Part", leftarm)
  153. collider111.Position = Vector3.new(0,9999,0)
  154. collider111.Size = Vector3.new(1.5,1,1)
  155. collider111.Shape = "Cylinder"
  156. local weld111 = Instance.new("Weld", collider111)
  157. weld111.Part0 = leftarm
  158. weld111.Part1 = collider111
  159. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  160. collider111.TopSurface = "Smooth"
  161. collider111.BottomSurface = "Smooth"
  162. collider111.formFactor = "Symmetric"
  163. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  164. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  165. collider111.Transparency = 1
  166. ----------------
  167. sensoring = Instance.new("Part", clone.Torso)
  168. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  169. sensoring.CanCollide = false
  170. sensoring.Position = clone.Torso.Position
  171. local welder = Instance.new("Weld", sensoring)
  172. welder.Part0 = clone.Torso
  173. welder.Part1 = sensoring
  174. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  175. sensoring.Transparency = 1
  176. -----------------
  177. sensoring1 = Instance.new("Part", clone.Torso)
  178. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  179. sensoring1.CanCollide = false
  180. sensoring1.Position = clone.Torso.Position
  181. local welder1 = Instance.new("Weld", sensoring)
  182. welder1.Part0 = clone.Torso
  183. welder1.Part1 = sensoring1
  184. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  185. sensoring1.Transparency = 1
  186. end
  187. clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)"
  188. ded:Play()
  189. vel:destroy()
  190. wait(0.5)
  191. local function touch()
  192. if not using then
  193. using = true
  194. local Math = math.random(1,4)
  195. if Math == 1 then
  196. hit:Play()
  197. end
  198. if Math == 2 then
  199. hit1:Play()
  200. end
  201. if Math == 3 then
  202. hit2:Play()
  203. end
  204. if Math == 4 then
  205. hit3:Play()
  206. end
  207. wait(0.1)
  208. using = false
  209. end
  210. end
  211. sensoring.Touched:connect(touch)
  212. sensoring1.Touched:connect(touch)
  213. while true do
  214. clone.Head.CanCollide = false
  215. game:GetService("RunService").Stepped:wait()
  216. end
  217. end
  218.  
  219. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  220.  
  221. --di ent
Add Comment
Please, Sign In to add comment