Advertisement
subaru112g

ragdoll

May 2nd, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.55 KB | None | 0 0
  1. local character = owner.Character
  2.  
  3. local fhum = character:FindFirstChildOfClass("Humanoid")
  4. if fhum.RigType == Enum.HumanoidRigType.R6 then
  5. local tors = character:FindFirstChild("Torso")
  6. local ra = character:FindFirstChild("Right Arm")
  7. local la = character:FindFirstChild("Left Arm")
  8. local rl = character:FindFirstChild("Right Leg")
  9. local ll = character:FindFirstChild("Left Leg")
  10.  
  11. if tors then
  12. if tors:FindFirstChild("Right Shoulder") then
  13. tors:FindFirstChild("Right Shoulder"):Destroy()
  14. end
  15. if tors:FindFirstChild("Left Shoulder") then
  16. tors:FindFirstChild("Left Shoulder"):Destroy()
  17. end
  18. if tors:FindFirstChild("Right Hip") then
  19. tors:FindFirstChild("Right Hip"):Destroy()
  20. end
  21. if tors:FindFirstChild("Left Hip") then
  22. tors:FindFirstChild("Left Hip"):Destroy()
  23. end
  24. if la then
  25. local c1 = Instance.new("Part", fhum.Parent)
  26. c1.Size = Vector3.new(1, 1 , 1)
  27. c1.Transparency = 1
  28. c1.Name = "lol"
  29. local weld1 = Instance.new("Weld", fhum.Parent)
  30. weld1.Part0 = fhum.Parent["Left Arm"]
  31. weld1.Part1 = c1
  32. weld1.C0 = CFrame.new(0,-0.5,0)
  33. local j3 = Instance.new("Glue", fhum.Parent)
  34. j3.Part0 = fhum.Parent.Torso
  35. j3.Part1 = fhum.Parent["Left Arm"]
  36. j3.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  37. j3.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  38. end
  39.  
  40. if ll then
  41. local c2 = Instance.new("Part", fhum.Parent)
  42. c2.Size = Vector3.new(1, 1 , 1)
  43. c2.Transparency = 1
  44. c2.Name = "lol"
  45. local weld2 = Instance.new("Weld", fhum.Parent)
  46. weld2.Part0 = fhum.Parent["Left Leg"]
  47. weld2.Part1 = c2
  48. weld2.C0 = CFrame.new(0,-0.5,0)
  49. local j4 = Instance.new("Glue", fhum.Parent)
  50. j4.Part0 = fhum.Parent.Torso
  51. j4.Part1 = fhum.Parent["Left Leg"]
  52. j4.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  53. j4.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  54. end
  55.  
  56. if ra then
  57. local c3 = Instance.new("Part", fhum.Parent)
  58. c3.Size = Vector3.new(1, 1 , 1)
  59. c3.Transparency = 1
  60. c3.Name = "lol"
  61. local weld3 = Instance.new("Weld", fhum.Parent)
  62. weld3.Part0 = fhum.Parent["Right Arm"]
  63. weld3.Part1 = c3
  64. weld3.C0 = CFrame.new(0,-0.5,0)
  65. local j1 = Instance.new("Glue", fhum.Parent)
  66. j1.Part0 = fhum.Parent.Torso
  67. j1.Part1 = fhum.Parent["Right Arm"]
  68. j1.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  69. j1.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  70. end
  71.  
  72. if rl then
  73. local c4 = Instance.new("Part", fhum.Parent)
  74. c4.Size = Vector3.new(1, 1 , 1)
  75. c4.Transparency = 1
  76. c4.Name = "lol"
  77. local weld4 = Instance.new("Weld", fhum.Parent)
  78. weld4.Part0 = fhum.Parent["Right Leg"]
  79. weld4.Part1 = c4
  80. weld4.C0 = CFrame.new(0,-0.5,0)
  81. local j2 = Instance.new("Glue", fhum.Parent)
  82. j2.Part0 = fhum.Parent.Torso
  83. j2.Part1 = fhum.Parent["Right Leg"]
  84. j2.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  85. j2.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  86. end
  87. end
  88. else
  89. local tors = character:FindFirstChild("UpperTorso")
  90. local tors2 = character:FindFirstChild("LowerTorso")
  91. local ra = character:FindFirstChild("RightUpperArm")
  92. local la = character:FindFirstChild("LeftUpperArm")
  93. local rl = character:FindFirstChild("RightUpperLeg")
  94. local ll = character:FindFirstChild("LeftUpperLeg")
  95.  
  96. if tors then
  97. if la then
  98. if character:FindFirstChild("LeftLowerArm") then
  99. local c1 = Instance.new("Part", fhum.Parent)
  100. c1.Size = character:FindFirstChild("LeftLowerArm").Size
  101. c1.Transparency = 1
  102. c1.Name = "lol"
  103. local weld1 = Instance.new("Weld", fhum.Parent)
  104. weld1.Part0 = fhum.Parent["LeftLowerArm"]
  105. weld1.Part1 = c1
  106. weld1.C0 = CFrame.new(0,-0.5,0)
  107. end
  108. local j3 = Instance.new("Glue", fhum.Parent)
  109. j3.Part0 = fhum.Parent.UpperTorso
  110. j3.Part1 = fhum.Parent["LeftUpperArm"]
  111. j3.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  112. j3.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  113. end
  114.  
  115. local j2,j4 = nil,nil
  116.  
  117. if tors2 then
  118. if ll then
  119. if character:FindFirstChild("LeftLowerLeg") then
  120. local c2 = Instance.new("Part", fhum.Parent)
  121. c2.Size = character:FindFirstChild("LeftLowerLeg").Size
  122. c2.Transparency = 1
  123. c2.Name = "lol"
  124. local weld2 = Instance.new("Weld", fhum.Parent)
  125. weld2.Part0 = fhum.Parent["LeftLowerLeg"]
  126. weld2.Part1 = c2
  127. weld2.C0 = CFrame.new(0,-0.5,0)
  128. end
  129. j4 = Instance.new("Glue", fhum.Parent)
  130. j4.Part0 = fhum.Parent.LowerTorso
  131. j4.Part1 = fhum.Parent["LeftUpperLeg"]
  132. --j4.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  133. --j4.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  134. end
  135.  
  136. if rl then
  137. if character:FindFirstChild("RightLowerLeg") then
  138. local c4 = Instance.new("Part", fhum.Parent)
  139. c4.Size = character:FindFirstChild("RightLowerLeg").Size
  140. c4.Transparency = 1
  141. c4.Name = "lol"
  142. local weld4 = Instance.new("Weld", fhum.Parent)
  143. weld4.Part0 = fhum.Parent["RightLowerLeg"]
  144. weld4.Part1 = c4
  145. weld4.C0 = CFrame.new(0,-0.5,0)
  146. end
  147. j2 = Instance.new("Glue", fhum.Parent)
  148. j2.Part0 = fhum.Parent.LowerTorso
  149. j2.Part1 = fhum.Parent["RightUpperLeg"]
  150. --j2.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  151. --j2.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  152. end
  153. end
  154.  
  155. if ra then
  156. if character:FindFirstChild("RightLowerArm") then
  157. local c3 = Instance.new("Part", fhum.Parent)
  158. c3.Size = character:FindFirstChild("RightLowerArm").Size
  159. c3.Transparency = 1
  160. c3.Name = "lol"
  161. local weld3 = Instance.new("Weld", fhum.Parent)
  162. weld3.Part0 = fhum.Parent["RightLowerArm"]
  163. weld3.Part1 = c3
  164. weld3.C0 = CFrame.new(0,-0.5,0)
  165. end
  166. local j1 = Instance.new("Glue", fhum.Parent)
  167. j1.Part0 = fhum.Parent.UpperTorso
  168. j1.Part1 = fhum.Parent["RightUpperArm"]
  169.  
  170. j1.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  171. j1.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  172. end
  173.  
  174. if ra and ra:FindFirstChild("RightShoulder") then
  175. if j1 then
  176. j1.C0 = ra:FindFirstChild("RightShoulder").C0
  177. j1.C1 = ra:FindFirstChild("RightShoulder").C1
  178. end
  179. ra:FindFirstChild("RightShoulder"):Destroy()
  180. end
  181. if la and la:FindFirstChild("LeftShoulder") then
  182. if j3 then
  183. j3.C0 = la:FindFirstChild("LeftShoulder").C0
  184. j3.C1 = la:FindFirstChild("LeftShoulder").C1
  185. end
  186. la:FindFirstChild("LeftShoulder"):Destroy()
  187. end
  188. if rl and rl:FindFirstChild("RightHip") then
  189. if j2 then
  190. j2.C0 = rl:FindFirstChild("RightHip").C0
  191. j2.C1 = rl:FindFirstChild("RightHip").C1
  192. end
  193. rl:FindFirstChild("RightHip"):Destroy()
  194. end
  195. if ll and ll:FindFirstChild("LeftHip") then
  196. if j4 then
  197. j4.C0 = ll:FindFirstChild("LeftHip").C0
  198. j4.C1 = ll:FindFirstChild("LeftHip").C1
  199. end
  200. ll:FindFirstChild("LeftHip"):Destroy()
  201. end
  202. end
  203. end
  204.  
  205. fhum.PlatformStand = true
  206. fhum.BreakJointsOnDeath = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement