Advertisement
ttyyuu12345

helicopter

Feb 12th, 2017
1,207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.76 KB | None | 0 0
  1. --Created by PenguinAnonymous with PenguinAnonymous's model to script converter
  2. wait()
  3. local bombs = 3
  4. local ammo = 300
  5. local firing = false
  6. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  7. mas = Instance.new("Model",game:GetService("Lighting"))
  8. mas.Name = "CompiledModel"
  9. o1 = Instance.new("Model")
  10. o2 = Instance.new("Seat")
  11. o3 = Instance.new("BodyPosition")
  12. o4 = Instance.new("BodyGyro")
  13. o5 = Instance.new("Seat")
  14. o6 = Instance.new("Seat")
  15. o7 = Instance.new("Seat")
  16. o8 = Instance.new("Seat")
  17. o9 = Instance.new("Seat")
  18. o10 = Instance.new("Seat")
  19. o11 = Instance.new("Part")
  20. o12 = Instance.new("Part")
  21. o13 = Instance.new("Part")
  22. o14 = Instance.new("Decal")
  23. o15 = Instance.new("Part")
  24. o16 = Instance.new("Decal")
  25. o17 = Instance.new("Part")
  26. o18 = Instance.new("Decal")
  27. o19 = Instance.new("Part")
  28. o20 = Instance.new("Decal")
  29. o21 = Instance.new("Part")
  30. o22 = Instance.new("Decal")
  31. o23 = Instance.new("Part")
  32. o24 = Instance.new("Part")
  33. o25 = Instance.new("Part")
  34. o26 = Instance.new("Part")
  35. o27 = Instance.new("Part")
  36. o1.Parent = mas
  37. o2.Name = "Heli"
  38. o2.Parent = o1
  39. o2.BrickColor = BrickColor.new("Black")
  40. o2.Position = Vector3.new(-2, 1.5, 1)
  41. o2.Size = Vector3.new(2, 1, 2)
  42. o2.CFrame = CFrame.new(-2, 1.5, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  43. o2.Color = Color3.new(0.105882, 0.164706, 0.207843)
  44. o2.Position = Vector3.new(-2, 1.5, 1)
  45. o3.Parent = o2
  46. o3.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  47. o4.Parent = o2
  48. o4.maxTorque = Vector3.new(400000, 400000, 400000)
  49. o4.MaxTorque = Vector3.new(400000, 400000, 400000)
  50. o5.Parent = o1
  51. o5.BrickColor = BrickColor.new("Black")
  52. o5.Position = Vector3.new(-6, 1.5, 21)
  53. o5.Size = Vector3.new(2, 1, 2)
  54. o5.CFrame = CFrame.new(-6, 1.5, 21, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  55. o5.Color = Color3.new(0.105882, 0.164706, 0.207843)
  56. o5.Position = Vector3.new(-6, 1.5, 21)
  57. o6.Parent = o1
  58. o6.BrickColor = BrickColor.new("Black")
  59. o6.Position = Vector3.new(-2, 1.5, 21)
  60. o6.Size = Vector3.new(2, 1, 2)
  61. o6.CFrame = CFrame.new(-2, 1.5, 21, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  62. o6.Color = Color3.new(0.105882, 0.164706, 0.207843)
  63. o6.Position = Vector3.new(-2, 1.5, 21)
  64. o7.Parent = o1
  65. o7.BrickColor = BrickColor.new("Black")
  66. o7.Position = Vector3.new(2, 1.5, 21)
  67. o7.Size = Vector3.new(2, 1, 2)
  68. o7.CFrame = CFrame.new(2, 1.5, 21, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  69. o7.Color = Color3.new(0.105882, 0.164706, 0.207843)
  70. o7.Position = Vector3.new(2, 1.5, 21)
  71. o8.Parent = o1
  72. o8.BrickColor = BrickColor.new("Black")
  73. o8.Position = Vector3.new(-6, 1.5, 17)
  74. o8.Size = Vector3.new(2, 1, 2)
  75. o8.CFrame = CFrame.new(-6, 1.5, 17, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  76. o8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  77. o8.Position = Vector3.new(-6, 1.5, 17)
  78. o9.Parent = o1
  79. o9.BrickColor = BrickColor.new("Black")
  80. o9.Position = Vector3.new(-2, 1.5, 17)
  81. o9.Size = Vector3.new(2, 1, 2)
  82. o9.CFrame = CFrame.new(-2, 1.5, 17, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  83. o9.Color = Color3.new(0.105882, 0.164706, 0.207843)
  84. o9.Position = Vector3.new(-2, 1.5, 17)
  85. o10.Parent = o1
  86. o10.BrickColor = BrickColor.new("Black")
  87. o10.Position = Vector3.new(2, 1.5, 17)
  88. o10.Size = Vector3.new(2, 1, 2)
  89. o10.CFrame = CFrame.new(2, 1.5, 17, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  90. o10.Color = Color3.new(0.105882, 0.164706, 0.207843)
  91. o10.Position = Vector3.new(2, 1.5, 17)
  92. o11.Parent = o1
  93. o11.Position = Vector3.new(5.5, 9, 12)
  94. o11.Rotation = Vector3.new(-180, 0, -180)
  95. o11.Size = Vector3.new(1, 4, 30)
  96. o11.CFrame = CFrame.new(5.5, 9, 12, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  97. o11.Position = Vector3.new(5.5, 9, 12)
  98. o12.Parent = o1
  99. o12.Position = Vector3.new(-9.5, 9, 12)
  100. o12.Rotation = Vector3.new(-0, 90, 0)
  101. o12.Size = Vector3.new(30, 4, 1)
  102. o12.CFrame = CFrame.new(-9.5, 9, 12, -0, 0, 1, -0, 1, 0, -1, 0, 0)
  103. o12.Position = Vector3.new(-9.5, 9, 12)
  104. o13.Parent = o1
  105. o13.Position = Vector3.new(5.5, 4, 20.5)
  106. o13.Rotation = Vector3.new(0, 90, 0)
  107. o13.Size = Vector3.new(13, 6, 1)
  108. o13.CFrame = CFrame.new(5.5, 4, 20.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  109. o13.Position = Vector3.new(5.5, 4, 20.5)
  110. o14.Parent = o13
  111. o14.Texture = "http://www.roblox.com/asset/?id=250437645"
  112. o14.Face = Enum.NormalId.Back
  113. o15.Parent = o1
  114. o15.Position = Vector3.new(5.5, 4, 2.5)
  115. o15.Rotation = Vector3.new(0, 90, 0)
  116. o15.Size = Vector3.new(11, 6, 1)
  117. o15.CFrame = CFrame.new(5.5, 4, 2.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  118. o15.Position = Vector3.new(5.5, 4, 2.5)
  119. o16.Parent = o15
  120. o16.Texture = "http://www.roblox.com/asset/?id=236149250"
  121. o16.Face = Enum.NormalId.Back
  122. o17.Parent = o1
  123. o17.Position = Vector3.new(-2.00000048, 6, 26.5)
  124. o17.Rotation = Vector3.new(-180, 0, -180)
  125. o17.Size = Vector3.new(14, 10, 1)
  126. o17.CFrame = CFrame.new(-2.00000048, 6, 26.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  127. o17.Position = Vector3.new(-2.00000048, 6, 26.5)
  128. o18.Parent = o17
  129. o18.Texture = "http://www.roblox.com/asset/?id=117528164"
  130. o19.Parent = o1
  131. o19.Position = Vector3.new(-9.5, 4, 20.5)
  132. o19.Rotation = Vector3.new(0, 90, 0)
  133. o19.Size = Vector3.new(13, 6, 1)
  134. o19.CFrame = CFrame.new(-9.5, 4, 20.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  135. o19.Position = Vector3.new(-9.5, 4, 20.5)
  136. o20.Parent = o19
  137. o20.Texture = "http://www.roblox.com/asset/?id=250437645"
  138. o21.Parent = o1
  139. o21.Position = Vector3.new(-9.5, 4, 2.5)
  140. o21.Rotation = Vector3.new(0, 90, 0)
  141. o21.Size = Vector3.new(11, 6, 1)
  142. o21.CFrame = CFrame.new(-9.5, 4, 2.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  143. o21.Position = Vector3.new(-9.5, 4, 2.5)
  144. o22.Parent = o21
  145. o22.Texture = "http://www.roblox.com/asset/?id=236149250"
  146. o23.Parent = o1
  147. o23.Position = Vector3.new(-2, 11.5, 12)
  148. o23.CanCollide = false
  149. o23.Size = Vector3.new(16, 1, 30)
  150. o23.CFrame = CFrame.new(-2, 11.5, 12, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  151. o23.Position = Vector3.new(-2, 11.5, 12)
  152. o24.Parent = o1
  153. o24.Position = Vector3.new(-2, 10.0000143, -2.5)
  154. o24.Size = Vector3.new(14, 2, 1)
  155. o24.CFrame = CFrame.new(-2, 10.0000143, -2.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  156. o24.Position = Vector3.new(-2, 10.0000143, -2.5)
  157. o25.Parent = o1
  158. o25.Transparency = 0.5
  159. o25.Position = Vector3.new(-2, 6.00000381, -2.5)
  160. o25.Size = Vector3.new(14, 6, 1)
  161. o25.CFrame = CFrame.new(-2, 6.00000381, -2.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  162. o25.Position = Vector3.new(-2, 6.00000381, -2.5)
  163. o26.Parent = o1
  164. o26.Position = Vector3.new(-2, 2, -2.5)
  165. o26.Size = Vector3.new(14, 2, 1)
  166. o26.CFrame = CFrame.new(-2, 2, -2.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  167. o26.Position = Vector3.new(-2, 2, -2.5)
  168. o27.Parent = o1
  169. o27.Position = Vector3.new(-2, 0.5, 12)
  170. o27.Size = Vector3.new(16, 1, 30)
  171. o27.CFrame = CFrame.new(-2, 0.5, 12, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  172. o27.BottomSurface = Enum.SurfaceType.Smooth
  173. o27.Position = Vector3.new(-2, 0.5, 12)
  174. mas.Parent = game:GetService("Players").LocalPlayer.Character
  175. mas:MakeJoints()
  176. bp = o3
  177. vs = o2
  178. bg = o4
  179. o1 = Instance.new("ScreenGui")
  180. o2 = Instance.new("Frame")
  181. o3 = Instance.new("TextLabel")
  182. o4 = Instance.new("TextLabel")
  183. o1.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  184. o2.Parent = o1
  185. o2.Position = UDim2.new(1,-205,1,-200)
  186. o2.Size = UDim2.new(0,200,0,100)
  187. o2.Position = UDim2.new(1,-205,1,-200)
  188. o2.BackgroundColor3 = Color3.new(0.0235294, 0.0235294, 0.0235294)
  189. o2.BackgroundTransparency = 0.5
  190. o3.Parent = o2
  191. o3.Size = UDim2.new(1,0,0.25,0)
  192. o3.Text = "BomberBus"
  193. o3.BackgroundColor3 = Color3.new(1, 1, 1)
  194. o3.BackgroundTransparency = 1
  195. o3.Font = Enum.Font.SourceSans
  196. o3.FontSize = Enum.FontSize.Size14
  197. o3.TextColor3 = Color3.new(1, 0, 0)
  198. o4.Name = "BombDetail"
  199. o4.Parent = o2
  200. o4.Position = UDim2.new(0,0,0.25,0)
  201. o4.Size = UDim2.new(1,0,0.25,0)
  202. o4.Text = "Bombs Left:"
  203. o4.Position = UDim2.new(0,0,0.25,0)
  204. o4.BackgroundColor3 = Color3.new(1, 1, 1)
  205. o4.BackgroundTransparency = 1
  206. o4.Font = Enum.Font.SourceSans
  207. o4.FontSize = Enum.FontSize.Size24
  208. o4.TextColor3 = Color3.new(1, 0, 0)
  209. o4.TextXAlignment = Enum.TextXAlignment.Left
  210. o5 = o4:Clone()
  211. o5.Parent = o2
  212. o5.Position = UDim2.new(0,0,0.5,0)
  213. o5.Text = "Ammo Left: "
  214. bombDetail = o4
  215. ammoDetail = o5
  216. bombFrame = o2
  217. rot = 180
  218. rotAdd = 0
  219. velx = 0
  220. vely = 0
  221. velz = 0
  222. bp.position = Vector3.new(0,4,0)
  223. local char = game:GetService("Players").LocalPlayer
  224. if char~=nil then
  225. local tor = char:findFirstChild("HumanoidRootPart")
  226. if tor~=nil then
  227. char:MoveTo(Vector3.new(vs.Position.X,vs.Position.Y+4,vs.Position.Z))
  228. end
  229. end
  230. game:GetService("RunService").RenderStepped:connect(function()
  231. if (vs~=nil)and(bp~=nil) then
  232. bombDetail.Text = "Bombs Left: " .. bombs
  233. ammoDetail.Text = "Ammo Left: " .. ammo
  234. local sw = vs:findFirstChild("SeatWeld")
  235. if sw~=nil then
  236. if game:GetService("Players"):GetPlayerFromCharacter(sw.Part1.Parent)==game:GetService("Players").LocalPlayer then
  237. bombFrame.Visible = true
  238. rot = rot + rotAdd/60
  239. bp.position = Vector3.new(bp.position.X+(velz*math.sin(rot)),bp.position.Y+vely,bp.position.Z+(velz*math.cos(rot)))
  240. bg.CFrame = CFrame.new(bp.position) * CFrame.Angles(0,rot,0)
  241. else
  242. sw:Destroy()
  243. end
  244. else
  245. bombFrame.Visible = false
  246. end
  247. if firing and sw~=nil and ammo>0 then
  248. local targ = mouse.Target
  249. local hit = mouse.Hit
  250. if hit~=nil then
  251. ammo = ammo - 1
  252. local startPos = vs.Position
  253. local hitPos = hit.p
  254. local size = Vector3.new(0.2,0.2,(startPos - hitPos).magnitude)
  255. local CFram = CFrame.new((startPos + hitPos)/2,startPos)
  256. local p = Instance.new("Part",workspace)
  257. p.Anchored = true
  258. p.CanCollide = false
  259. p.Size = size
  260. p.CFrame = CFram;
  261. p.BrickColor = BrickColor.Yellow()
  262. if targ~=nil then
  263. local hum = targ.Parent:findFirstChild("Humanoid") or targ.Parent.Parent:findFirstChild("Humanoid")
  264. if hum~=nil then
  265. hum.Health = hum.Health - (hum.MaxHealth/5)
  266. else
  267. pcall(function()
  268. targ:BreakJoints()
  269. if string.lower(targ.Name)~="base" and string.lower(targ.Name)~="baseplate" then
  270. targ.Anchored = false
  271. end
  272. end)
  273. end
  274. end
  275. game:GetService("Debris"):AddItem(p,0.1)
  276. end
  277. end
  278. end
  279. end)
  280. coroutine.resume(coroutine.create(function()
  281. while wait(20) do
  282. if bombs<3 then
  283. bombs = bombs + 1
  284. end
  285. if ammo<300 then
  286. if ammo>200 then
  287. ammo = 300
  288. else
  289. ammo = ammo + 100
  290. end
  291. end
  292. end
  293. end))
  294. mouse.Button1Down:connect(function()
  295. firing = true
  296. end)
  297. mouse.Button1Up:connect(function()
  298. firing = false
  299. end)
  300. function DropBomb()
  301. if bombs>0 then
  302. bombs = bombs - 1
  303. local p = Instance.new("Part",workspace)
  304. local pos = Vector3.new(vs.position.x,vs.position.Y-8,vs.position.Z)
  305. p.Shape = Enum.PartType.Ball
  306. p.Size = Vector3.new(1,1,1)
  307. p.Position = pos
  308. p.Touched:connect(function(hit)
  309. local ex = Instance.new("Explosion",workspace)
  310. ex.Position = p.Position
  311. ex.BlastRadius = 24
  312. ex.BlastPressure = 120000
  313. p:Destroy()
  314. end)
  315. end
  316. end
  317. uib = game:GetService("UserInputService").InputBegan:connect(function(input,gameProcessed)
  318. if input.UserInputType == Enum.UserInputType.Keyboard then
  319. if vs:findFirstChild("SeatWeld") then
  320. local keyPressed = input.KeyCode
  321. if keyPressed==Enum.KeyCode.E then
  322. vely = 20/60
  323. end
  324. if keyPressed==Enum.KeyCode.Q then
  325. vely = -20/60
  326. end
  327. if keyPressed==Enum.KeyCode.W then
  328. velz = -120/60
  329. end
  330. if keyPressed == Enum.KeyCode.S then
  331. velz = 120/60
  332. end
  333. if keyPressed == Enum.KeyCode.A then
  334. rotAdd = 3
  335. end
  336. if keyPressed == Enum.KeyCode.D then
  337. rotAdd = -3
  338. end
  339. if keyPressed == Enum.KeyCode.F then
  340. DropBomb()
  341. end
  342. end
  343. end
  344. end)
  345. uie = game:GetService("UserInputService").InputEnded:connect(function(input,gameProcessed)
  346. if input.UserInputType == Enum.UserInputType.Keyboard then
  347. local keyPressed = input.KeyCode
  348. --print(keyPressed)
  349. if keyPressed==Enum.KeyCode.E then
  350. vely = 0
  351. end
  352. if keyPressed==Enum.KeyCode.Q then
  353. vely = 0
  354. end
  355. if keyPressed==Enum.KeyCode.W then
  356. velz = 0
  357. velx = 0
  358. end
  359. if keyPressed == Enum.KeyCode.S then
  360. velz = 0
  361. end
  362. if keyPressed == Enum.KeyCode.A then
  363. rotAdd = 0
  364. end
  365. if keyPressed == Enum.KeyCode.D then
  366. rotAdd = 0
  367. end
  368. end
  369. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement