DrakerMaker

Ded

Nov 15th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1.  
  2. Character=owner.Character
  3.  
  4. local leftarm = Character:FindFirstChild("Left Arm")
  5. local leftleg = Character:FindFirstChild("Left Leg")
  6. local rightleg = Character:FindFirstChild("Right Leg")
  7. local rightarm = Character:FindFirstChild("Right Arm")
  8. local torso = Character:FindFirstChild("Torso")
  9. local head = Character:FindFirstChild("Head")
  10. local root = Character:FindFirstChild("HumanoidRootPart")
  11.  
  12. local HeadA = Instance.new("Attachment")
  13. HeadA.Name = "HeadA"
  14. HeadA.Parent = head
  15. HeadA.Position = Vector3.new(0, -0.5, 0)
  16. HeadA.Rotation = Vector3.new(0, 0, -0)
  17. HeadA.Axis = Vector3.new(1, -0, -0)
  18. HeadA.SecondaryAxis = Vector3.new(0, 1, 0)
  19.  
  20. local LeftArmA = Instance.new("Attachment")
  21. LeftArmA.Name = "LeftArmA"
  22. LeftArmA.Parent = leftarm
  23. LeftArmA.Position = Vector3.new(0.4, 0.8, 0)
  24. LeftArmA.Rotation = Vector3.new(-180, 0, 90)
  25. LeftArmA.Axis = Vector3.new(0, -1, -0)
  26. LeftArmA.SecondaryAxis = Vector3.new(-1, 0, 0)
  27.  
  28. local LeftLegA = Instance.new("Attachment")
  29. LeftLegA.Name = "LeftLegA"
  30. LeftLegA.Parent = leftleg
  31. LeftLegA.Position = Vector3.new(0, 1, 0)
  32. LeftLegA.Rotation = Vector3.new(90, -90, 0)
  33. LeftLegA.Axis = Vector3.new(0, -1, -0)
  34. LeftLegA.SecondaryAxis = Vector3.new(0, -0, 1)
  35.  
  36. local RightArmA = Instance.new("Attachment")
  37. RightArmA.Name = "RightArmA"
  38. RightArmA.Parent = rightarm
  39. RightArmA.Position = Vector3.new(-0.4, 0.8, 0)--Vector3.new(0, 1, 0)
  40. RightArmA.Rotation = Vector3.new(-180, 0, 90)--Vector3.new(90, -90, 0)
  41. RightArmA.Axis = Vector3.new(0, -1, -0)--Vector3.new(0, -1, -0)
  42. RightArmA.SecondaryAxis = Vector3.new(0, 1, 0)--Vector3.new(0, -0, 1)
  43.  
  44. local RightLegA = Instance.new("Attachment")
  45. RightLegA.Name = "RightLegA"
  46. RightLegA.Parent = rightleg
  47. RightLegA.Position = Vector3.new(0, 1, 0) --Vector3.new(-0.4, 0.8, 0)
  48. RightLegA.Rotation = Vector3.new(90, -90, 0)--Vector3.new(-180, 0, 90)
  49. RightLegA.Axis = Vector3.new(0, -1, -0)--Vector3.new(0, -1, -0)
  50. RightLegA.SecondaryAxis = Vector3.new(0, -0, 1)--Vector3.new(0, 1, 0)
  51.  
  52. local TorsoA = Instance.new("Attachment")
  53. TorsoA.Name = "TorsoA"
  54. TorsoA.Parent = torso
  55. TorsoA.Position = Vector3.new(0.5, -1.1, 0)
  56. TorsoA.Rotation = Vector3.new(90, -90, 0)
  57. TorsoA.Axis = Vector3.new(0, -1, -0)
  58. TorsoA.SecondaryAxis = Vector3.new(0, -0, 1)
  59.  
  60. local TorsoA1 = Instance.new("Attachment")
  61. TorsoA1.Name = "TorsoA1"
  62. TorsoA1.Parent = torso
  63. TorsoA1.Position = Vector3.new(-0.5, -1.1, 0)
  64. TorsoA1.Rotation = Vector3.new(90, -90, 0)
  65. TorsoA1.Axis = Vector3.new(0, -1, -0)
  66. TorsoA1.SecondaryAxis = Vector3.new(0, -0, 1)
  67.  
  68. local TorsoA2 = Instance.new("Attachment")
  69. TorsoA2.Name = "TorsoA2"
  70. TorsoA2.Parent = torso
  71. TorsoA2.Position = Vector3.new(-1, 0.8, 0)
  72. TorsoA2.Rotation = Vector3.new(0, 0, -180)
  73. TorsoA2.Axis = Vector3.new(-1, -0, 0)
  74. TorsoA2.SecondaryAxis = Vector3.new(0, -1, 0)
  75.  
  76. local TorsoA3 = Instance.new("Attachment")
  77. TorsoA3.Name = "TorsoA3"
  78. TorsoA3.Parent = torso
  79. TorsoA3.Position = Vector3.new(1, 0.8, 0)
  80. TorsoA3.Rotation = Vector3.new(-180, 0, 0)
  81. TorsoA3.Axis = Vector3.new(1, -0, 0)
  82. TorsoA3.SecondaryAxis = Vector3.new(-0, -1, -0)
  83.  
  84. local TorsoA4 = Instance.new("Attachment")
  85. TorsoA4.Name = "TorsoA4"
  86. TorsoA4.Parent = torso
  87. TorsoA4.Position = Vector3.new(0, 1, 0)
  88. TorsoA4.Rotation = Vector3.new(0, 0, -0)
  89. TorsoA4.Axis = Vector3.new(1, -0, 0)
  90. TorsoA4.SecondaryAxis = Vector3.new(0, 1, 0)
  91.  
  92. local TorsoA5 = Instance.new("Attachment")
  93. TorsoA5.Name = "TorsoA5"
  94. TorsoA5.Parent = torso
  95. TorsoA5.Position = Vector3.new(0, 0, 0)
  96. TorsoA5.Rotation = Vector3.new(0, 90, 0)
  97. TorsoA5.Axis = Vector3.new(0, 0, -1)
  98. TorsoA5.SecondaryAxis = Vector3.new(0, 1, 0)
  99.  
  100. local TorsoA6 = Instance.new("Attachment")
  101. TorsoA6.Name = "TorsoA6"
  102. TorsoA6.Parent = torso
  103. TorsoA6.Position = Vector3.new(0, 1, 0)
  104. TorsoA5.Rotation = Vector3.new(0, 0, 0)
  105. --TorsoA6.Axis = Vector3.new(0, 0, -1)
  106. --TorsoA6.SecondaryAxis = Vector3.new(0, 1, 0)
  107.  
  108.  
  109. local rootA = Instance.new("Attachment")
  110. rootA.Name= "rootA"
  111. rootA.Parent = root
  112. rootA.Position = Vector3.new(0, 0, 0)
  113. rootA.Rotation = Vector3.new(0, 90, 0)
  114. rootA.Axis = Vector3.new(0, 0, -1)
  115. rootA.SecondaryAxis = Vector3.new(0, 1, 0)
  116.  
  117.  
  118. local LAT = Instance.new("BallSocketConstraint")
  119. LAT.Parent = leftarm
  120. LAT.Attachment0 = LeftArmA
  121. LAT.Attachment1 = TorsoA2
  122. LAT.Enabled = true
  123.  
  124. local RAT = Instance.new("BallSocketConstraint")
  125. RAT.Parent = rightarm
  126. RAT.Attachment0 = RightArmA
  127. RAT.Attachment1 = TorsoA3
  128. RAT.Enabled = true
  129.  
  130. local TLL = Instance.new("BallSocketConstraint")
  131. TLL.Parent = torso
  132. TLL.Attachment0 = TorsoA1
  133. TLL.Attachment1 = LeftLegA
  134. TLL.Enabled = true
  135.  
  136. local TRL = Instance.new("BallSocketConstraint")
  137. TRL.Parent = torso
  138. TRL.Attachment0 = TorsoA
  139. TRL.Attachment1 = RightLegA
  140. TRL.Enabled = true
  141.  
  142. local RTA = Instance.new("BallSocketConstraint")
  143. RTA.Parent = root
  144. RTA.Attachment0 = rootA
  145. RTA.Attachment1 = TorsoA5
  146. RTA.Enabled = true
  147.  
  148. local Neck = Instance.new("BallSocketConstraint")
  149. Neck.Parent = torso
  150. Neck.Attachment0 = TorsoA6
  151. Neck.Attachment1 = HeadA
  152. Neck.Enabled = true
  153.  
  154. function getAttachment0(attachmentName)
  155. for _,child in next,Character:GetChildren() do
  156. local attachment = child:FindFirstChild(attachmentName)
  157. if attachment then
  158. return attachment
  159. end
  160. end
  161. end
  162.  
  163.  
  164. for _,child in next,Character:GetChildren() do
  165. if child:IsA("Accoutrement") then
  166. --Loop through all parts instead of only checking for one to be forwards-compatible in the event
  167. --ROBLOX implements multi-part accessories
  168. for _,part in next,child:GetChildren() do
  169. if part:IsA("BasePart") then
  170. local attachment1 = part:FindFirstChildOfClass("Attachment")
  171. local attachment0 = getAttachment0(attachment1.Name)
  172. if attachment0 and attachment1 then
  173. --Shouldn't use constraints for this, but have to because of a ROBLOX idiosyncrasy where
  174. --joints connecting a character are perpetually deleted while the character is dead
  175. local constraint = Instance.new("HingeConstraint")
  176. constraint.Attachment0 = attachment0
  177. constraint.Attachment1 = attachment1
  178. constraint.LimitsEnabled = true
  179. constraint.UpperAngle = 0 --Simulate weld by making it difficult for constraint to move
  180. constraint.LowerAngle = 0
  181. constraint.Parent = Character
  182. end
  183. end
  184. end
  185. end
  186. end
  187. owner.Character.Humanoid.Died:connect(function()
  188. local ex = Instance.new("Explosion", workspace)
  189. ex.Position = owner.Character.Torso.Position
  190. local sound = Instance.new("Sound", owner.Character.Torso)
  191. sound.SoundId = "rbxassetid://899623922"
  192. sound.Volume = 2
  193. sound:Play()
  194. end)
Add Comment
Please, Sign In to add comment