Advertisement
subaru112g

electric gun

Jan 25th, 2019
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.33 KB | None | 0 0
  1. local plr = owner
  2. local char = owner.Character
  3.  
  4. local BillboardGui = Instance.new("BillboardGui")
  5. local TextLabel = Instance.new("TextLabel")
  6.  
  7. BillboardGui.Name = "says"
  8. BillboardGui.Parent = char.Head
  9. BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  10. BillboardGui.AlwaysOnTop = true
  11. BillboardGui.ExtentsOffset = Vector3.new(0, 3, 0)
  12. BillboardGui.LightInfluence = 1
  13. BillboardGui.Size = UDim2.new(0, 200, 0, 50)
  14.  
  15. TextLabel.Parent = BillboardGui
  16. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  17. TextLabel.BackgroundTransparency = 1
  18. TextLabel.Size = UDim2.new(0, 200, 0, 50)
  19. TextLabel.Font = Enum.Font.SourceSans
  20. TextLabel.Text = ""
  21. TextLabel.TextColor3 = Color3.new(0, 0, 0)
  22. TextLabel.TextScaled = true
  23. TextLabel.TextSize = 14
  24. TextLabel.TextWrapped = true
  25.  
  26. char.Humanoid.WalkSpeed = 30
  27.  
  28. char.Humanoid.Name = "Dead"
  29.  
  30. local attacking = false
  31.  
  32. local t = Instance.new("Tool")
  33. t.Name = "Electric gun"
  34. t.GripPos = Vector3.new(-0.037, -0.692, 3.651)
  35. local ha = Instance.new("Part",t)
  36. ha.Size = Vector3.new(0.5, 0.5, 10)
  37. ha.Name = "Handle"
  38. local m = Instance.new("SpecialMesh",ha)
  39. m.MeshId = "rbxassetid://445567359"
  40. m.TextureId = "rbxassetid://445567371"
  41. m.Offset = Vector3.new(0, 0, 3)
  42. t.Parent = owner.Character
  43.  
  44. function onTouched(fire)
  45. if attacking == false then
  46. local enemy = fire.Parent:FindFirstChildOfClass("Humanoid")
  47. if enemy then
  48. if not(enemy.Name == "Dead") then
  49. attacking = true
  50. local m = Instance.new("Model", game.Workspace)
  51. m.Name = "Dead, "..enemy.Parent.Name
  52.  
  53. local say = math.random(1,6)
  54. if say == 1 then
  55. TextLabel.Text = "Die nub lol."
  56. end
  57.  
  58. if say == 2 then
  59. TextLabel.Text = "You are dead."
  60. end
  61.  
  62. if say == 3 then
  63. TextLabel.Text = "Die!"
  64. end
  65.  
  66. if say == 4 then
  67. TextLabel.Text = "You died nub."
  68. end
  69.  
  70. if say == 5 then
  71. TextLabel.Text = "Goodbye, "..enemy.Parent.Name
  72. end
  73.  
  74. if say == 6 then
  75. TextLabel.Text = "You died, "..enemy.Parent.Name.."!"
  76. end
  77.  
  78. local h = Instance.new("Part",m)
  79. h.Name = "Head"
  80. local me = plr.Character.Head.Mesh:Clone()
  81. me.Parent = h
  82. local facee = plr.Character.Head.face:Clone()
  83. facee.Parent = h
  84. h.Size = plr.Character.Head.Size
  85. h:BreakJoints()
  86. h.CanCollide = false
  87. h.Position = enemy.Parent.Head.Position
  88. h.face.Texture = "http://www.roblox.com/asset/?id=1350110313"
  89.  
  90. local t = Instance.new("Part",m)
  91. t.Name = "Torso"
  92. t.Size = plr.Character.Torso.Size
  93. t:BreakJoints()
  94. t.CanCollide = false
  95. t.Position = h.Position
  96. t.Position = t.Position - Vector3.new(0, 2, 0)
  97.  
  98. local ra = Instance.new("Part",m)
  99. ra.Name = "Right Arm"
  100. ra.Size = plr.Character["Right Arm"].Size
  101. ra:BreakJoints()
  102. ra.Position = plr.Character["Right Arm"].Position
  103. ra.Position = ra.Position + Vector3.new(0, 10, 0)
  104.  
  105. local la = Instance.new("Part",m)
  106. la.Name = "Left Arm"
  107. la.Size = plr.Character["Left Arm"].Size
  108. la:BreakJoints()
  109. la.Position = plr.Character["Left Arm"].Position
  110. la.Position = la.Position + Vector3.new(0, 10, 0)
  111.  
  112. local ll = Instance.new("Part",m)
  113. ll.Name = "Left Leg"
  114. ll.Size = plr.Character["Left Leg"].Size
  115. ll:BreakJoints()
  116. ll.Position = plr.Character["Left Leg"].Position
  117. ll.Position = ll.Position + Vector3.new(0, 10, 0)
  118.  
  119. local rl = Instance.new("Part",m)
  120. rl.Name = "Right Leg"
  121. rl.Size = plr.Character["Right Leg"].Size
  122. rl:BreakJoints()
  123. rl.Position = plr.Character["Right Leg"].Position
  124. rl.Position = rl.Position + Vector3.new(0, 10, 0)
  125.  
  126. for i,v in pairs(m:GetChildren()) do
  127. v:BreakJoints()
  128. end
  129.  
  130. local neck = Instance.new("Motor6D")
  131. neck.Name = "Neck"
  132. neck.Part0 = t
  133. neck.Part1 = h
  134. neck.Parent = t
  135. neck.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  136. neck.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  137.  
  138. local rs = Instance.new("Motor6D")
  139. rs.Name = "Right Shoulder"
  140. rs.Part0 = t
  141. rs.Part1 = ra
  142. rs.Parent = t
  143. rs.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  144. rs.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  145.  
  146. local ls = Instance.new("Motor6D")
  147. ls.Name = "Left Shoulder"
  148. ls.Part0 = t
  149. ls.Part1 = la
  150. ls.Parent = t
  151. ls.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  152. ls.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  153.  
  154. local lh = Instance.new("Motor6D")
  155. lh.Name = "Left Hip"
  156. lh.Part0 = t
  157. lh.Part1 = ll
  158. lh.Parent = t
  159. lh.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  160. lh.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  161.  
  162. local rh = Instance.new("Motor6D")
  163. rh.Name = "Right Hip"
  164. rh.Part0 = t
  165. rh.Part1 = rl
  166. rh.Parent = t
  167. rh.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  168. rh.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  169.  
  170. wait(0.000000000000001)
  171.  
  172. h.BrickColor = BrickColor.new("Really black")
  173. ra.BrickColor = BrickColor.new("Really black")
  174. la.BrickColor = BrickColor.new("Really black")
  175. t.BrickColor = BrickColor.new("Really black")
  176. rl.BrickColor = BrickColor.new("Really black")
  177. ll.BrickColor = BrickColor.new("Really black")
  178.  
  179. for i,v in pairs(enemy.Parent:GetChildren()) do
  180.  
  181. v:Destroy()
  182.  
  183. end
  184. local enemy = Instance.new("Humanoid", m)
  185. enemy.PlatformStand = true
  186. enemy.Name = "Dead"
  187.  
  188. local shot = Instance.new("Sound", char.Head)
  189. shot.SoundId = "rbxassetid://186130717"
  190. shot.Volume = 1
  191. shot:Play()
  192. enemy.Parent.Torso["Left Hip"].Part1 = nil
  193. enemy.Parent.Torso["Left Shoulder"].Part1 = nil
  194. enemy.Parent.Torso["Right Hip"].Part1 = nil
  195. enemy.Parent.Torso["Right Shoulder"].Part1 = nil
  196.  
  197. local c1 = Instance.new("Part", enemy.Parent)
  198. c1.Size = Vector3.new(1, 1 , 1)
  199. c1.Transparency = 1
  200. local c2 = Instance.new("Part", enemy.Parent)
  201. c2.Size = Vector3.new(1, 1 , 1)
  202. c2.Transparency = 1
  203. local c3 = Instance.new("Part", enemy.Parent)
  204. c3.Size = Vector3.new(1, 1 , 1)
  205. c3.Transparency = 1
  206. local c4 = Instance.new("Part", enemy.Parent)
  207. c4.Size = Vector3.new(1, 1 , 1)
  208. c4.Transparency = 1
  209.  
  210.  
  211. local weld1 = Instance.new("Weld", enemy.Parent)
  212. weld1.Part0 = enemy.Parent["Left Arm"]
  213. weld1.Part1 = c1
  214.  
  215. local weld2 = Instance.new("Weld", enemy.Parent)
  216. weld2.Part0 = enemy.Parent["Left Leg"]
  217. weld2.Part1 = c2
  218.  
  219. local weld3 = Instance.new("Weld", enemy.Parent)
  220. weld3.Part0 = enemy.Parent["Right Arm"]
  221. weld3.Part1 = c3
  222.  
  223. local weld4 = Instance.new("Weld", enemy.Parent)
  224. weld4.Part0 = enemy.Parent["Right Leg"]
  225. weld4.Part1 = c4
  226.  
  227. local j1 = Instance.new("Glue", enemy.Parent)
  228. j1.Part0 = enemy.Parent.Torso
  229. j1.Part1 = enemy.Parent["Right Arm"]
  230. j1.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  231. j1.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  232.  
  233. local j2 = Instance.new("Glue", enemy.Parent)
  234. j2.Part0 = enemy.Parent.Torso
  235. j2.Part1 = enemy.Parent["Right Leg"]
  236. j2.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  237. j2.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  238.  
  239. local j3 = Instance.new("Glue", enemy.Parent)
  240. j3.Part0 = enemy.Parent.Torso
  241. j3.Part1 = enemy.Parent["Left Arm"]
  242. j3.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  243. j3.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  244.  
  245. local j4 = Instance.new("Glue", enemy.Parent)
  246. j4.Part0 = enemy.Parent.Torso
  247. j4.Part1 = enemy.Parent["Left Leg"]
  248. j4.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  249. j4.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  250. wait(0.1)
  251.  
  252. attacking = false
  253. wait(3)
  254. TextLabel.Text = ""
  255. end
  256. end
  257. end
  258. end
  259. ha.Touched:connect(onTouched)
  260.  
  261. while true do
  262. wait()
  263. TextLabel.Rotation = math.random(-10,10)
  264. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement