Steelecrusher

AC130

Dec 10th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.48 KB | None | 0 0
  1. --[[mediafire gtfo password]]--
  2.  
  3. local players = game:GetService("Players")
  4. local workspace = game:GetService("Workspace")
  5. local me = players.yfc
  6. local name = me.Name
  7. local char = me.Character
  8. local pg = me.PlayerGui
  9. local move = false
  10. local mach = false
  11.  
  12. pcall(function() workspace.Base.AC130:remove() end)
  13. local model = Instance.new("Model", workspace.Base)
  14. model.Name = "AC130"
  15.  
  16. local base = Instance.new("Part", model)
  17. base.Size = Vector3.new(15, 10, 30)
  18. base.BrickColor = BrickColor.new("Mid stone grey")
  19. base.Anchored = false
  20. base.CFrame = CFrame.new(25, 16, 0)
  21. base:BreakJoints()
  22. local basep = Instance.new("BodyPosition", base)
  23. basep.position = Vector3.new(0, 25, 0)
  24. basep.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  25. local basem = Instance.new("SpecialMesh", base)
  26. basem.MeshType = "Sphere"
  27. local base2 = Instance.new("Part", model)
  28. base2.Size = Vector3.new(30, 2, 8)
  29. base2.BrickColor = BrickColor.new("Mid stone grey")
  30. base2.Anchored = false
  31. base2.CFrame = CFrame.new(25, 20, 0)
  32. base2:BreakJoints()
  33. local base2m = Instance.new("BlockMesh", base2)
  34. local base2w = Instance.new("Weld", base2)
  35. base2w.Part0 = base2
  36. base2w.Part1 = base
  37. base2w.C1 = CFrame.new(0, 0, 0)
  38.  
  39. if script.Parent.className ~= "HopperBin" then
  40.     local h = Instance.new("HopperBin", me.Backpack)
  41.     h.Name = "AC-130"
  42.     script.Parent = h
  43. end
  44.  
  45. local bin = script.Parent
  46.  
  47. function onSelected(mouse)
  48.     mouse.Button1Down:connect(function()
  49. if move == false then
  50. move = true
  51. coroutine.resume(coroutine.create(function()
  52. while wait() do
  53. if move == true then
  54. basep.position = mouse.hit.p + Vector3.new(0, 25, 0)
  55. else
  56. break
  57. end
  58. end
  59. end))
  60. end
  61.     end)
  62.     mouse.Button1Up:connect(function()
  63. move = false
  64.     end)
  65.     mouse.KeyDown:connect(function(key)
  66.         if key == "q" then
  67. if mach == false then
  68. mach = true
  69. pos = mouse.hit.p + Vector3.new(math.random(-1.5, 1.5), 0, math.random(-1.5, 1.5))
  70. pos2 = base.Position
  71. local shot = Instance.new("Part", workspace)
  72. shot.formFactor = "Custom"
  73. shot.BrickColor = BrickColor.new("New Yeller")
  74. shot.Size = Vector3.new(0.2, 0.2, (pos - pos2).magnitude)
  75. shot.Anchored = true
  76. shot.CanCollide = false
  77. shot.CFrame = CFrame.new((pos + pos2)/2, pos)
  78. coroutine.resume(coroutine.create(function()
  79. wait(0.15)
  80. shot:remove()
  81. end))
  82. coroutine.resume(coroutine.create(function()
  83. while wait() do
  84. if mach == true then
  85. pos = mouse.hit.p + Vector3.new(math.random(-1.5, 1.5), 0, math.random(-1.5, 1.5))
  86. pos2 = base.Position
  87. local shot = Instance.new("Part", workspace)
  88. shot.formFactor = "Custom"
  89. shot.BrickColor = BrickColor.new("New Yeller")
  90. shot.Size = Vector3.new(0.2, 0.2, (pos - pos2).magnitude)
  91. shot.Anchored = true
  92. shot.CanCollide = false
  93. shot.CFrame = CFrame.new((pos + pos2)/2, pos)
  94. coroutine.resume(coroutine.create(function()
  95. wait(0.15)
  96. shot:remove()
  97. end))
  98. else
  99. break
  100. end
  101. end
  102. end))
  103. end
  104.         end
  105.         if key == "e" then
  106. if bom == false then
  107. bom = true
  108. pos = mouse.hit.p + Vector3.new(math.random(-1.5, 1.5), 0, math.random(-1.5, 1.5))
  109. pos2 = base.Position
  110. local shot = Instance.new("Part", workspace)
  111. shot.formFactor = "Custom"
  112. shot.BrickColor = BrickColor.new("New Yeller")
  113. shot.Size = Vector3.new(0.2, 0.2, (pos - pos2).magnitude)
  114. shot.Anchored = true
  115. shot.CanCollide = false
  116. shot.CFrame = CFrame.new((pos + pos2)/2, pos)
  117. local ex = Instance.new("Explosion", workspace)
  118. ex.Position = pos
  119. ex.BlastRadius = 2.5
  120. coroutine.resume(coroutine.create(function()
  121. wait(0.15)
  122. shot:remove()
  123. end))
  124. coroutine.resume(coroutine.create(function()
  125. while wait() do
  126. if bom == true then
  127. pos = mouse.hit.p + Vector3.new(math.random(-1.5, 1.5), 0, math.random(-1.5, 1.5))
  128. pos2 = base.Position
  129. local shot = Instance.new("Part", workspace)
  130. shot.formFactor = "Custom"
  131. shot.BrickColor = BrickColor.new("New Yeller")
  132. shot.Size = Vector3.new(0.2, 0.2, (pos - pos2).magnitude)
  133. shot.Anchored = true
  134. shot.CanCollide = false
  135. shot.CFrame = CFrame.new((pos + pos2)/2, pos)
  136. local ex = Instance.new("Explosion", workspace)
  137. ex.Position = pos
  138. ex.BlastRadius = 2.5
  139. coroutine.resume(coroutine.create(function()
  140. wait(0.15)
  141. shot:remove()
  142. end))
  143. else
  144. break
  145. end
  146. end
  147. end))
  148. end
  149.         end
  150.     end)
  151.    mouse.KeyUp:connect(function(key)
  152.         if key == "q" then
  153. mach = false
  154.         end
  155.         if key == "e" then
  156. bom = false
  157.         end
  158.     end)
  159. end
  160.  
  161. function onDesel(mouse)
  162. end
  163.  
  164. bin.Selected:connect(onSelected)
  165. bin.Deselected:connect(onDesel)
Add Comment
Please, Sign In to add comment