Advertisement
AlphaSploit

Homing missile

Feb 24th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.60 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2. Character = Player.Character
  3. script.Parent = Character
  4. --[[ * Fire Handle * ]]--
  5. pcall(function() Character.Gun:Remove() end)
  6. Gun = Instance.new("Model")
  7. Gun.Name = "Gun"
  8. Gun.Parent = Character
  9. --[[ * Gui * ]]--
  10. MG = Instance.new("ScreenGui",Player.PlayerGui)
  11. BS = Instance.new("Frame")
  12. BS.Parent = MG
  13. BS.Size = UDim2.new(1,0,1,0)
  14. BS.Position = UDim2.new(0,0,0,0)
  15. BS.BackgroundColor3 = Color3.new(0,0,0)
  16. BS.BorderSizePixel = 0
  17. BS.BackgroundTransparency = 0
  18. wait(0.5)
  19. for i = 1,10 do wait()
  20. BS.BackgroundTransparency = BS.BackgroundTransparency + 0.1
  21. end
  22. --[[ * Arm Weld * ]]--
  23. ArmWeld = Instance.new("Weld")
  24. ArmWeld.Parent = Character["Torso"]
  25. ArmWeld.Part0 = ArmWeld.Parent
  26. ArmWeld.Part1 = Character["Right Arm"]
  27. ArmWeld.C0 = CFrame.new(1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  28. --[[ * Arm Weld * ]]--
  29. ArmWeldR = Instance.new("Weld")
  30. ArmWeldR.Parent = Character["Torso"]
  31. ArmWeldR.Part0 = ArmWeldR.Parent
  32. ArmWeldR.Part1 = Character["Left Arm"]
  33. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  34. --[[ * Neck Weld * ]]--
  35. Neck = Instance.new("Weld")
  36. Neck.Parent = Character["Torso"]
  37. Neck.Part0 = Neck.Parent
  38. Neck.Part1 = Character["Head"]
  39. Neck.C0 = CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  40. --[[ * Handle * ]]--
  41. Handle = Instance.new("Part")
  42. Handle.Material = "SmoothPlastic"
  43. Handle.formFactor = "Custom"
  44. Handle.Locked = true
  45. Handle.CanCollide = false
  46. Handle.BrickColor = BrickColor.new(141)
  47. Handle.Anchored = false
  48. Handle.Size = Vector3.new(0.5,1,0.5)
  49. Handle.TopSurface = 0
  50. Handle.BottomSurface = 0
  51. Handle.Parent = Gun
  52. MeshA = Instance.new("BlockMesh",Handle)
  53. WeldA = Instance.new("Weld")
  54. WeldA.Parent = Handle
  55. WeldA.Part0 = Character["Right Arm"]
  56. WeldA.Part1 = Handle
  57. WeldA.C0 = CFrame.new(0,-1.1,-0.2) * CFrame.Angles(math.pi/2-0.2,0,0)
  58. --[[ * Cann * ]]--
  59. Cann = Instance.new("Part")
  60. Cann.Material = "SmoothPlastic"
  61. Cann.formFactor = "Custom"
  62. Cann.Locked = true
  63. Cann.CanCollide = false
  64. Cann.BrickColor = BrickColor.new(141)
  65. Cann.Anchored = false
  66. Cann.Size = Vector3.new(1.05,3,1.05)
  67. Cann.TopSurface = 0
  68. Cann.BottomSurface = 0
  69. Cann.Parent = Gun
  70. MeshB = Instance.new("CylinderMesh",Cann)
  71. WeldB = Instance.new("Weld")
  72. WeldB.Parent = Cann
  73. WeldB.Part0 = Handle
  74. WeldB.Part1 = Cann
  75. WeldB.C0 = CFrame.new(0,-0.7,-0.5) * CFrame.Angles(math.pi/2+0.2,0,0)
  76. --[[ * Lense * ]]--
  77. Lense = Instance.new("Part")
  78. Lense.Material = "SmoothPlastic"
  79. Lense.formFactor = "Custom"
  80. Lense.Locked = true
  81. Lense.CanCollide = false
  82. Lense.BrickColor = BrickColor.new("Navy blue")
  83. Lense.Anchored = false
  84. Lense.Size = Vector3.new(0.9,3,0.9)
  85. Lense.Reflectance = 0.1
  86. Lense.TopSurface = 0
  87. Lense.BottomSurface = 0
  88. Lense.Parent = Gun
  89. MeshC = Instance.new("CylinderMesh",Lense)
  90. WeldC = Instance.new("Weld")
  91. WeldC.Parent = Lense
  92. WeldC.Part0 = Handle
  93. WeldC.Part1 = Lense
  94. WeldC.C0 = CFrame.new(0,-0.7,-0.4) * CFrame.Angles(math.pi/2+0.2,0,0)
  95. --[[ * Back * ]]--
  96. Back = Instance.new("Part")
  97. Back.Material = "SmoothPlastic"
  98. Back.formFactor = "Custom"
  99. Back.Locked = true
  100. Back.CanCollide = false
  101. Back.BrickColor = BrickColor.new("Really black")
  102. Back.Anchored = false
  103. Back.Size = Vector3.new(1.1,0.2,1.1)
  104. Back.TopSurface = 0
  105. Back.BottomSurface = 0
  106. Back.Parent = Gun
  107. MeshD = Instance.new("CylinderMesh",Back)
  108. WeldD = Instance.new("Weld")
  109. WeldD.Parent = Back
  110. WeldD.Part0 = Cann
  111. WeldD.Part1 = Back
  112. WeldD.C0 = CFrame.new(0,-1.5,0) * CFrame.Angles(0,0,0)
  113. --[[ * Stripe1 * ]]--
  114. Stripe1 = Instance.new("Part")
  115. Stripe1.Material = "SmoothPlastic"
  116. Stripe1.formFactor = "Custom"
  117. Stripe1.Locked = true
  118. Stripe1.CanCollide = false
  119. Stripe1.BrickColor = BrickColor.new("Really black")
  120. Stripe1.Anchored = false
  121. Stripe1.Size = Vector3.new(1.05,2.8,0.2)
  122. Stripe1.TopSurface = 0
  123. Stripe1.BottomSurface = 0
  124. Stripe1.Parent = Gun
  125. MeshE = Instance.new("BlockMesh",Stripe1)
  126. WeldE = Instance.new("Weld")
  127. WeldE.Parent = Stripe1
  128. WeldE.Part0 = Cann
  129. WeldE.Part1 = Stripe1
  130. WeldE.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.pi/2/2,0)
  131. --[[ * Stripe2 * ]]--
  132. Stripe2 = Instance.new("Part")
  133. Stripe2.Material = "SmoothPlastic"
  134. Stripe2.formFactor = "Custom"
  135. Stripe2.Locked = true
  136. Stripe2.CanCollide = false
  137. Stripe2.BrickColor = BrickColor.new("Really black")
  138. Stripe2.Anchored = false
  139. Stripe2.Size = Vector3.new(1.05,2.8,0.2)
  140. Stripe2.TopSurface = 0
  141. Stripe2.BottomSurface = 0
  142. Stripe2.Parent = Gun
  143. MeshF = Instance.new("BlockMesh",Stripe2)
  144. WeldF = Instance.new("Weld")
  145. WeldF.Parent = Stripe2
  146. WeldF.Part0 = Cann
  147. WeldF.Part1 = Stripe2
  148. WeldF.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,-math.pi/2/2,0)
  149. --[[ * Curb * ]]--
  150. Curb = Instance.new("Part")
  151. Curb.Material = "SmoothPlastic"
  152. Curb.formFactor = "Custom"
  153. Curb.Locked = true
  154. Curb.CanCollide = false
  155. Curb.BrickColor = BrickColor.new(141)
  156. Curb.Anchored = false
  157. Curb.Size = Vector3.new(0.5,0.2,0.5)
  158. Curb.TopSurface = 0
  159. Curb.BottomSurface = 0
  160. Curb.Parent = Gun
  161. MeshG = Instance.new("BlockMesh",Curb)
  162. WeldG = Instance.new("Weld")
  163. WeldG.Parent = Curb
  164. WeldG.Part0 = Cann
  165. WeldG.Part1 = Curb
  166. WeldG.C0 = CFrame.new(-0.3,0,0) * CFrame.Angles(0,0,0)
  167. --[[ * Hinged * ]]--
  168. Hinged = Instance.new("Part")
  169. Hinged.Material = "SmoothPlastic"
  170. Hinged.formFactor = "Custom"
  171. Hinged.Locked = true
  172. Hinged.CanCollide = false
  173. Hinged.BrickColor = BrickColor.new("Really black")
  174. Hinged.Anchored = false
  175. Hinged.Size = Vector3.new(0.2,0.55,0.2)
  176. Hinged.TopSurface = 0
  177. Hinged.BottomSurface = 0
  178. Hinged.Parent = Gun
  179. MeshH = Instance.new("CylinderMesh",Hinged)
  180. WeldH = Instance.new("Weld")
  181. WeldH.Parent = Hinged
  182. WeldH.Part0 = Cann
  183. WeldH.Part1 = Hinged
  184. WeldH.C0 = CFrame.new(-0.55,0,0) * CFrame.Angles(math.pi/2,math.pi/2,0)
  185. --[[ * Monitor * ]]--
  186. Monitor = Instance.new("Part")
  187. Monitor.Material = "SmoothPlastic"
  188. Monitor.formFactor = "Custom"
  189. Monitor.Locked = true
  190. Monitor.CanCollide = false
  191. Monitor.BrickColor = BrickColor.new(141)
  192. Monitor.Anchored = false
  193. Monitor.Size = Vector3.new(1,0.5,0.2)
  194. Monitor.TopSurface = 0
  195. Monitor.BottomSurface = 0
  196. Monitor.Parent = Gun
  197. MeshI = Instance.new("BlockMesh",Monitor)
  198. WeldI = Instance.new("Weld")
  199. WeldI.Parent = Monitor
  200. WeldI.Part0 = Hinged
  201. WeldI.Part1 = Monitor
  202. WeldI.C0 = CFrame.new(-0.55,0,0) * CFrame.Angles(0,0,0)
  203. --[[ * Screen * ]]--
  204. Screen = Instance.new("Part")
  205. Screen.Material = "SmoothPlastic"
  206. Screen.formFactor = "Custom"
  207. Screen.Locked = true
  208. Screen.CanCollide = false
  209. Screen.BrickColor = BrickColor.new("Really black")
  210. Screen.Anchored = false
  211. Screen.Size = Vector3.new(1,0.5,0.2)
  212. Screen.TopSurface = 0
  213. Screen.BottomSurface = 0
  214. Screen.Parent = Gun
  215. MeshJ = Instance.new("BlockMesh",Screen)
  216. MeshJ.Scale = Vector3.new(0.8,0.8,0.8)
  217. WeldJ = Instance.new("Weld")
  218. WeldJ.Parent = Screen
  219. WeldJ.Part0 = Hinged
  220. WeldJ.Part1 = Screen
  221. WeldJ.C0 = CFrame.new(-0.55,0,0.1) * CFrame.Angles(0,0,0)
  222. --[[ * Tool * ]]--
  223. if script.Parent.Name == Player.Name then
  224. Hopper = Instance.new("HopperBin")
  225. Hopper.Name = "Missle"
  226. Hopper.Parent = Player.Backpack
  227. end
  228. Blah = true
  229. EndBlah = true
  230. first = true
  231. function Clicked(Mouse)
  232. print(1)
  233. if Blah == true then
  234. Blah = false
  235. Character.Humanoid.WalkSpeed = 16
  236. if first == true then
  237. for i = 1,10 do wait()
  238. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(math.pi/10/2/2,0,0)
  239. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0,0,0.05)
  240. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2/2,0,0.1)
  241. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.1,0,0.06)
  242. WeldA.C0 = WeldA.C0 * CFrame.Angles(-0.1,0,-0.05)
  243. WeldA.C0 = WeldA.C0 - Vector3.new(0.05,-0.03,-0.05)
  244. end
  245. for i = 1,5 do wait()
  246. WeldH.C0 = WeldH.C0 * CFrame.Angles(0,-math.pi/10/2,0)
  247. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2/2,0,-0.1)
  248. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.1,0,0.06)
  249. end
  250. for i = 1,5 do wait()
  251. WeldH.C0 = WeldH.C0 * CFrame.Angles(0,-math.pi/10/2,0)
  252. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2/2,0,-0.1)
  253. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.1,0,0.06)
  254. end
  255. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  256. for i = 1,10 do wait()
  257. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(math.pi/10/2/2,0,0)
  258. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(-0.04,0.075,0.03)
  259. WeldA.C0 = WeldA.C0 * CFrame.Angles(0.1,0,0.05)
  260. WeldA.C0 = WeldA.C0 + Vector3.new(0.05,-0.03,-0.05)
  261. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,-0.05,0.1)
  262. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.12,-0.05,0.05)
  263. BS.BackgroundTransparency = BS.BackgroundTransparency - 0.1
  264. end
  265. first = false
  266. end
  267. WeldA.C0 = CFrame.new(0,-1.1,-0.2) * CFrame.Angles(math.pi/2-0.2,0,0)
  268. wait(0.5)
  269. local P = Instance.new("Part")
  270. P.Material = "SmoothPlastic"
  271. P.Anchored = true
  272. P.Locked = true
  273. P.formFactor = "Custom"
  274. P.TopSurface = 0
  275. P.BottomSurface = 0
  276. P.Parent = Gun
  277. P.Size = Vector3.new(2,2,10)
  278. P.CFrame = Back.CFrame * CFrame.new(0, 0, -8)--CFrame.new(0,250,500)
  279. Pmsh = Instance.new("SpecialMesh")
  280. Pmsh.MeshType = "FileMesh"
  281. Pmsh.Scale = Vector3.new(3, 3, 3)
  282. Pmsh.MeshId = "http://www.roblox.com/asset/?id=111879014"
  283. Pmsh.TextureId = "http://www.roblox.com/asset/?id=111878985"
  284. Pmsh.Parent = P
  285. PLight = Instance.new("PointLight", P)
  286. PLight.Brightness = 2
  287. PLight.Range = 3
  288. PLight.Color = Color3.new(1,1,1)
  289. PF = Instance.new("Fire", P)
  290. PF.Heat = 5.1
  291. PSmoke = Instance.new("Smoke",P)
  292. PSmoke.Color = Color3.new(0.2, 0.2, 0.2) -- E_E IT'S NOT COLORING FOR SOME REASON
  293. iExplode = false
  294. P.Touched:connect(function(pHit)
  295. -- A little 'Advanced' tip --
  296. hit = pHit.Parent
  297. if hit:FindFirstChild("Humanoid") and iExplode == false and hit.Name ~= Character.Name then
  298. local Explo = Instance.new("Explosion", Game:service("Workspace"))
  299. Explo.Position = P.Position
  300. pcall(function() P:Destroy() end)
  301. iExplode = true
  302. elseif hit.Parent:FindFirstChild("Humanoid") and iExplode == false and hit.Name ~= Character.Name then
  303. local Explo = Instance.new("Explosion", Game:service("Workspace"))
  304. Explo.Position = P.Position
  305. pcall(function() P:Destroy() end)
  306. iExplode = true
  307. end
  308. end)
  309. wait(0.5)
  310. P.Anchored = true
  311. coroutine.resume(coroutine.create(function()
  312. for i = 1,10 do wait()
  313. BS.BackgroundTransparency = BS.BackgroundTransparency + 0.1
  314. end
  315. Blah = true
  316. end))
  317. while true do wait()
  318. P.CFrame = CFrame.new(P.Position, Mouse.Hit.p) * CFrame.new(0,0,-3)
  319. end
  320. Blah = true
  321. end
  322. end
  323. function onKeyDown(key)
  324. if Blah == true then
  325. Blah = false
  326. wait(0.1)
  327. Blah = true -- i think dis is for da shooting func...
  328. return
  329. end
  330. end
  331. function Selected(Mouse)
  332. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  333. Mouse.KeyDown:connect(onKeyDown)
  334. Mouse.Button1Down:connect(function()Clicked(Mouse)end)
  335. end
  336. function Deselected(Mouse)
  337. end
  338. function Dead()
  339. end
  340. Character.Humanoid.Died:connect(Dead)
  341. Hopper.Selected:connect(Selected)
  342. Hopper.Deselected:connect(Deselected)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement