Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.63 KB | None | 0 0
  1. ----- Made by DoogleFox, Full credit to him
  2. script:ClearAllChildren()
  3. for i, v in pairs(game.Players.LocalPlayer.Backpack:children()) do
  4. if v.className == "HopperBin" and v.Name == "Plane" then
  5. v:remove()
  6. end
  7. end
  8. bin = Instance.new("HopperBin")
  9. bin.Name = "Plane"
  10. bin.Parent = game.Players.LocalPlayer.Backpack
  11. local hop = Instance.new("HopperBin")
  12. hop.Parent = nil
  13. script.Parent = hop
  14.  
  15. local sonic = Instance.new("Sound")
  16. local StreamlineColor = BrickColor.new("Bright red")
  17. local bulletspeed = 15
  18. local bombdropspeed = 0.1
  19. local maxspeed = 1000
  20. local acceleration = 20
  21.  
  22. local character = game.Players.LocalPlayer.Character
  23. local char = game.Players.LocalPlayer.Character
  24. local Torsoz = game.Players.LocalPlayer.Character:findFirstChild("Torso")
  25. local RA = game.Players.LocalPlayer.Character:findFirstChild("Right Arm")
  26. local LA = game.Players.LocalPlayer.Character:findFirstChild("Left Arm")
  27. local RL = game.Players.LocalPlayer.Character:findFirstChild("Right Leg")
  28. local LL = game.Players.LocalPlayer.Character:findFirstChild("Left Leg")
  29. local H = game.Players.LocalPlayer.Character:findFirstChild("Head")
  30. local RS = Torsoz:findFirstChild("Right Shoulder")
  31. local LS = Torsoz:findFirstChild("Left Shoulder")
  32. local RH = Torsoz:findFirstChild("Right Hip")
  33. local LH = Torsoz:findFirstChild("Left Hip")
  34. local N = Torsoz:findFirstChild("Neck")
  35. local Main
  36. local Joint1
  37. local PlaneActive = false
  38. local Flying = false
  39. local PlaneTab = {}
  40. local EffectTab = {}
  41. local RayTab = {}
  42. local LastPart
  43. local speed = 0
  44. local MOUSE
  45. local hu = Instance.new("Humanoid")
  46. local speedup = false
  47. local speeddown = false
  48. local streamline = false
  49. local Shooting = false
  50. local CanDropBomb = true
  51. local MinigunSound
  52. local BombSound
  53. local LockOnTarget
  54.  
  55. local P = Instance.new("Part")
  56. P.Anchored = false
  57. sonic.Parent = P
  58. sonic.Volume = 10
  59. P.CanCollide = false
  60. P.Name = "Part"
  61. P.formFactor = "Custom"
  62. P.Size = Vector3.new(0.5,0.5,0.5)
  63. P.Locked = true
  64. P.TopSurface = 0
  65. P.BottomSurface = 0
  66.  
  67. local gui = Instance.new("ScreenGui")
  68. gui.Name = "PlaneSpeedGui"
  69. local f = Instance.new("Frame", gui)
  70. f.Name = "Meter"
  71. f.Position = UDim2.new(0.45,0,0.75,0)
  72. f.Size = UDim2.new(0.1,0,0.05,0)
  73. f.BackgroundColor = BrickColor.new("Really black")
  74. f.BorderColor = BrickColor.new("Dark stone grey")
  75. local n = Instance.new("TextLabel", f)
  76. n.Name = "Meter"
  77. n.Position = UDim2.new(0,0,0,0)
  78. n.Size = UDim2.new(1,0,1,0)
  79. n.BackgroundColor = BrickColor.new("Really black")
  80. n.TextColor = BrickColor.new("White")
  81. n.BorderColor = BrickColor.new("Dark stone grey")
  82. n.BackgroundTransparency = 1
  83. n.FontSize = 3
  84. n.Text = "Speed: "..speed.."/"..maxspeed
  85. n.ZIndex = 2
  86. local ff = n:Clone()
  87. ff.Parent = f
  88. ff.BackgroundTransparency = 0
  89. ff.Position = UDim2.new(-0.3,0,0,0)
  90. ff.Size = UDim2.new(0.3,0,1,0)
  91. ff.Text = "Q"
  92. local ff = n:Clone()
  93. ff.Parent = f
  94. ff.BackgroundTransparency = 0
  95. ff.Position = UDim2.new(1,0,0,0)
  96. ff.Size = UDim2.new(0.3,0,1,0)
  97. ff.Text = "E"
  98. local ff = n:Clone()
  99. ff.Parent = f
  100. ff.BackgroundTransparency = 0
  101. ff.Position = UDim2.new(-0.3,0,1,0)
  102. ff.Size = UDim2.new(1.6,0,0.5,0)
  103. ff.FontSize = 1
  104. ff.Text = "F ~ Streamline"
  105. local n2 = Instance.new("Frame", f)
  106. n2.Name = "MeterBar"
  107. n2.Position = UDim2.new(0,0,0,0)
  108. n2.Size = UDim2.new(0,0,1,0)
  109. n2.BackgroundColor3 = Color3.new(0,0,0)
  110. n2.BorderColor = BrickColor.new("Dark stone grey")
  111. n2.ZIndex = 1
  112. local ff = n:Clone()
  113. ff.Parent = f
  114. ff.Position = UDim2.new(-0.3,0,1.5,0)
  115. ff.Size = UDim2.new(1.6,0,0.5,0)
  116. ff.FontSize = 1
  117. ff.Text = "Plane Health: 0"
  118. local n3 = Instance.new("Frame", f)
  119. n3.Name = "MeterBar"
  120. n3.Position = UDim2.new(-0.3,0,1.5,0)
  121. n3.Size = UDim2.new(1,0,0.5,0)
  122. n3.BackgroundColor3 = Color3.new(0,1,0)
  123. n3.BorderColor = BrickColor.new("Dark stone grey")
  124. n3.ZIndex = 1
  125.  
  126. function Build()
  127. for i, v in pairs(char:children()) do
  128. if v.className == "Model" and v.Name == "Plane" then
  129. v:remove()
  130. end
  131. end
  132. local mdl2 = Instance.new("Model", char)
  133. mdl2.Name = "Plane"
  134. local mdl = Instance.new("Model", mdl2)
  135. mdl.Name = "RC Plane"
  136.  
  137. local h = P:Clone()
  138. h.Name = "Torso"
  139. h.Parent = mdl
  140. h.Position = Torsoz.Position
  141. h.Size = Vector3.new(1.9,1,1.9)
  142. local mesh = Instance.new("SpecialMesh", h)
  143. mesh.Name = "Mesh"
  144. mesh.MeshId = "http://www.roblox.com/asset/?id=68752248"
  145. mesh.TextureId = "http://www.roblox.com/asset/?id=77082085"
  146. --- 77082085 black plane
  147. --- 69308394 original
  148. mesh.Scale = Vector3.new(9,9,9)
  149. local w = Instance.new("Motor", h)
  150. w.Part0 = Torsoz
  151. w.Part1 = h
  152. w.C0 = CFrame.new(0,0,0.1) * CFrame.Angles(math.pi/2,-math.pi/4,0)
  153. Main = w
  154. local h2 = P:Clone()
  155. h2.Name = "Controller"
  156. h2.Parent = mdl
  157. h2.Position = Torsoz.Position
  158. h2.Size = Vector3.new(0.5,0.5,0.5)
  159. local mesh = Instance.new("SpecialMesh", h2)
  160. mesh.Name = "Mesh"
  161. mesh.MeshId = "http://www.roblox.com/asset/?id=31183234"
  162. mesh.TextureId = "http://www.roblox.com/asset/?id=31183303"
  163. mesh.Scale = Vector3.new(0.5,0.5,0.5)
  164. local w = Instance.new("Motor", h2)
  165. w.Part0 = RL
  166. w.Part1 = h2
  167. w.C0 = CFrame.new(0.5,0.8,0) * CFrame.Angles(0,-math.pi/2,0)
  168. Main2 = w
  169.  
  170. end
  171. Build()
  172.  
  173. function Launch(mouse)
  174. MOUSE = mouse
  175. PlaneActive = true
  176. local p = P:Clone()
  177. p.Parent = Torsoz
  178. p.Transparency = 1
  179. local w = Instance.new("Motor", p)
  180. w.Part0 = p
  181. w.Part1 = RA
  182. w.C0 = CFrame.new(0,-0.5,0)
  183. RS.Part0 = nil
  184. Joint1 = Instance.new("Motor", p)
  185. Joint1.Part0 = Torsoz
  186. Joint1.Part1 = p
  187. Joint1.C0 = CFrame.new(1.5,0.5,0)
  188.  
  189. local jointz = Joint1
  190. for i = 1, 14 do
  191. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi*1.2/14,0,0)
  192. wait()
  193. end
  194. wait() wait()
  195. Main.Part0 = RA
  196. Main.C0 = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(0,math.pi,math.pi) * CFrame.Angles(-math.pi*0.2,0,0)
  197. wait() wait()
  198. for i = 1, 3 do
  199. Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,0.2/3,0)
  200. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
  201. wait()
  202. end
  203. for i = 1, 2 do
  204. Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,0,0)
  205. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
  206. wait()
  207. end
  208. for i = 1, 2 do
  209. Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,-0.5/2,0)
  210. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
  211. wait()
  212. end
  213. Main.Part0 = nil
  214. speed = 0.4
  215. Main.Parent.Anchored = true
  216. local h = P:Clone()
  217. h.Size = Vector3.new(4,2.4,3.25)
  218. h.Parent = Main.Parent.Parent
  219. h.Transparency = 0.99
  220. h.Name = "Head"
  221. h.CFrame = Main.Parent.CFrame
  222. MinigunSound = Instance.new("Sound", h)
  223. MinigunSound.Pitch = 1.75
  224. MinigunSound.Volume = 0.3
  225. MinigunSound.SoundId = "http://www.roblox.com/asset/?id=2691586"
  226. BombSound = Instance.new("Sound", h)
  227. BombSound.Pitch = 0.875
  228. BombSound.Volume = 0.5
  229. BombSound.SoundId = "http://www.roblox.com/asset/?id=2233908"
  230. -- old sound: http://www.roblox.com/asset/?id=2233908
  231. -- new sound: http://www.roblox.com/asset/?id=81116747
  232. local mesh = Instance.new("BlockMesh", h)
  233. mesh.Scale = Vector3.new(0.03,0.03,0.03)
  234. local w = Instance.new("Snap", h)
  235. w.Part0 = Main.Parent
  236. w.Part1 = h
  237. hu = Instance.new("Humanoid", Main.Parent.Parent)
  238. hu.MaxHealth = 100
  239. wait()
  240. hu.Health = 100
  241. local h2 = P:Clone()
  242. h2.Anchored = true
  243. h2.BrickColor = BrickColor.new("Really black")
  244. h2.Parent = Main.Parent.Parent
  245. h2.Name = "Minigun1"
  246. h2.CFrame = Main.Parent.CFrame
  247. local mesh = Instance.new("SpecialMesh", h2)
  248. mesh.Scale = Vector3.new(0.3,0.3,0.3)
  249. mesh.MeshId = "http://www.roblox.com/asset/?id=2806162"
  250. local h3 = P:Clone()
  251. h3.Anchored = true
  252. h3.BrickColor = BrickColor.new("Really black")
  253. h3.Parent = Main.Parent.Parent
  254. h3.Name = "Minigun2"
  255. h3.CFrame = Main.Parent.CFrame
  256. local mesh = Instance.new("SpecialMesh", h3)
  257. mesh.Scale = Vector3.new(0.3,0.3,0.3)
  258. mesh.MeshId = "http://www.roblox.com/asset/?id=2806162"
  259. local h4 = P:Clone()
  260. h4.Anchored = true
  261. h4.BrickColor = BrickColor.new("Black")
  262. h4.Parent = Main.Parent.Parent
  263. h4.Name = "Missile1"
  264. h4.CFrame = Main.Parent.CFrame
  265. local mesh = Instance.new("SpecialMesh", h4)
  266. mesh.Scale = Vector3.new(0.35,0.55,0.55)
  267. mesh.MeshId = "http://www.roblox.com/asset/?id=1030777"
  268. mesh.TextureId = "http://www.roblox.com/asset/?id=1030776"
  269. mesh.VertexColor = Vector3.new(0.45,0.45,0.45)
  270. local h5 = P:Clone()
  271. h5.Anchored = true
  272. h5.BrickColor = BrickColor.new("Black")
  273. h5.Parent = Main.Parent.Parent
  274. h5.Name = "Missile2"
  275. h5.CFrame = Main.Parent.CFrame
  276. local mesh = Instance.new("SpecialMesh", h5)
  277. mesh.Scale = Vector3.new(0.35,0.55,0.55)
  278. mesh.MeshId = "http://www.roblox.com/asset/?id=1030777"
  279. mesh.TextureId = "http://www.roblox.com/asset/?id=1030776"
  280. mesh.VertexColor = Vector3.new(0.45,0.45,0.45)
  281. local mdlz = Instance.new("Model", Main.Parent.Parent)
  282. mdlz.Name = "RC Plane"
  283. local h6 = P:Clone()
  284. h6.Shape = "Ball"
  285. h6.Size = Vector3.new(17,17,17)
  286. h6.Parent = mdlz
  287. h6.Anchored = true
  288. h6.Transparency = 0.99
  289. h6.Name = "LockOnDetector"
  290. h6.CFrame = Main.Parent.CFrame
  291. local mesh = Instance.new("SpecialMesh", h6)
  292. mesh.MeshType = "Sphere"
  293. mesh.Scale = Vector3.new(0.03,0.03,0.03)
  294.  
  295. for i = 1, 11 do
  296. Main.Parent.CFrame = Main.Parent.CFrame + Main.Parent.CFrame.lookVector*speed
  297. h.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  298. h2.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
  299. h3.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
  300. h4.CFrame = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  301. h5.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  302. h6.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  303. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.5/11,0,0)
  304. wait()
  305. end
  306. Main2.Part0 = RA
  307. Main2.C0 = CFrame.new(0,-1,-0.8) * CFrame.Angles(math.pi/2,0,math.pi)
  308. for i = 1, 8 do
  309. Main.Parent.CFrame = Main.Parent.CFrame + Main.Parent.CFrame.lookVector*speed
  310. h.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  311. h2.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
  312. h3.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
  313. h4.CFrame = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  314. h5.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  315. h6.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  316. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/2.2/8,0,0)
  317. Main2.C0 = Main2.C0 * CFrame.new(0.8/8,0,0)
  318. wait()
  319. end
  320.  
  321. PlaneTab[1] = Main.Parent
  322. PlaneTab[2] = h
  323. PlaneTab[3] = h2
  324. PlaneTab[4] = h3
  325. PlaneTab[5] = h4
  326. PlaneTab[6] = h5
  327. PlaneTab[7] = h6
  328. Flying = true
  329. workspace.CurrentCamera.CameraSubject = hu
  330. char.Humanoid.WalkSpeed = 0
  331. gui.Parent = game.Players.LocalPlayer:findFirstChild("PlayerGui")
  332.  
  333. end
  334.  
  335. function Cancel()
  336. LastPart = nil
  337. Joint1.Parent:Destroy()
  338. gui.Parent = nil
  339. workspace.CurrentCamera.CameraSubject = char.Humanoid
  340. char.Humanoid.WalkSpeed = 16
  341. RS.Part0 = Torsoz
  342. PlaneActive = false
  343. Flying = false
  344. Shooting = false
  345. for ii, vv in pairs(PlaneTab) do
  346. if vv.Parent.Name == "Plane" then
  347. vv:remove()
  348. PlaneTab[ii] = nil
  349. end
  350. end
  351. end
  352.  
  353. function onButton1Down(mouse)
  354. if Flying == true then
  355. Shooting = true
  356. end
  357. if PlaneActive == false then
  358. Launch(mouse)
  359. end
  360. end
  361.  
  362. function onButton1Up()
  363. Shooting = false
  364. end
  365.  
  366. function BombDrop()
  367. if CanDropBomb == true then
  368. CanDropBomb = false
  369. local B = P:Clone()
  370. B.Parent = Main.Parent
  371. B.Name = "Bomb"
  372. B.Anchored = true
  373. B.CFrame = CFrame.new(Main.Parent.Position, Vector3.new(MOUSE.Hit.x,Main.Parent.Position.y,MOUSE.Hit.z)) * CFrame.Angles(-math.pi/2.3,0,0)
  374. game:service("Debris"):AddItem(B, 4)
  375. local mesh = Instance.new("SpecialMesh", B)
  376. mesh.MeshId = "http://www.roblox.com/asset/?id=74333739"
  377. mesh.TextureId = "http://www.roblox.com/asset/?id=74320150"
  378. table.insert(RayTab, B)
  379. Spawn(function() wait(0.5) CanDropBomb = true end)
  380. end
  381. end
  382.  
  383. function onKeyDown(key, mouse)
  384. if key == "e" then
  385. speedup = true
  386. elseif key == "q" then
  387. speeddown = true
  388. elseif key == "k" then
  389. speed = 10000
  390. sonic:Play()
  391. elseif key == "f" then
  392. if streamline == true then
  393. streamline = false
  394. else
  395. streamline = true
  396. end
  397. elseif key == "r" then
  398. if Flying == true then
  399. BombDrop()
  400. end
  401. end
  402. end
  403.  
  404. function onKeyUp(key)
  405. if key == "e" then
  406. speedup = false
  407. elseif key == "q" then
  408. speeddown = false
  409. end
  410. end
  411.  
  412. bin.Selected:connect(function(mouse)
  413. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  414. --mouse.Icon = "rbxasset://textures\\advancedMove.png"
  415. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  416. mouse.Button1Up:connect(function() onButton1Up() end)
  417. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  418. mouse.KeyUp:connect(function(key) onKeyUp(key) end)
  419. end)
  420.  
  421. bin.Deselected:connect(function()
  422. pcall(function() Cancel() Build() end)
  423. end)
  424.  
  425.  
  426. function Splosion(Pos, ScalE, PartZ, LoopZ, dmg)
  427. ScalE = ScalE or 2
  428. PartZ = PartZ or 7
  429. LoopZ = LoopZ or 2
  430. dmg = dmg or 0
  431. for _ = 1, LoopZ do
  432. local tab = {}
  433. for i = 1, PartZ do
  434. local E = P:Clone()
  435. E.Parent = Torsoz
  436. E.Anchored = true
  437. E.Transparency = 0.3
  438. E.CFrame = CFrame.new(Pos) * CFrame.Angles(math.random(-360, 360)/360,math.random(-360, 360)/360,math.random(-360, 360)/360)
  439. local nam = math.random(1,3)
  440. local colz = {"Bright yellow", "Bright orange", "Bright red"}
  441. E.BrickColor = BrickColor.new(colz[nam])
  442. local mesh = Instance.new("SpecialMesh", E)
  443. mesh.Scale = Vector3.new(1,1,1)
  444. mesh.MeshType = "Sphere"
  445. table.insert(tab, E)
  446. end
  447. local R3 = Region3.new(Pos-(Vector3.new(3,3,3)*ScalE), Pos+(Vector3.new(3,3,3)*ScalE))
  448. local R3F = workspace:FindPartsInRegion3(R3, char, 40)
  449. local Humanz = {}
  450. for i, v in pairs(R3F) do
  451. local HAS = false
  452. if v.Parent:findFirstChild("Humanoid") ~= nil then
  453. for I, V in pairs(Humanz) do
  454. if v.Parent:findFirstChild("Humanoid") == V then
  455. HAS = true
  456. end
  457. end
  458. if HAS == false then
  459. table.insert(Humanz, v.Parent:findFirstChild("Humanoid"))
  460. end
  461. end
  462. end
  463. for i, v in pairs(Humanz) do
  464. v.Health = v.Health - dmg
  465. end
  466. for _ = 1, 7 do
  467. for i, v in pairs(tab) do
  468. v.Transparency = v.Transparency + 0.7/7
  469. v.Mesh.Scale = v.Mesh.Scale + (Vector3.new(7/7, 14/7,4/7))*ScalE
  470. end
  471. wait()
  472. end
  473. for i, v in pairs(tab) do
  474. v:Destroy()
  475. tab[i] = nil
  476. end
  477. end
  478. end
  479.  
  480.  
  481.  
  482. local iii = 0
  483. local sidez = true
  484. while true do
  485. iii = iii + 1
  486. for i, v in pairs(PlaneTab) do
  487. if v ~= nil then
  488. if v.Parent ~= nil then
  489. if v.Parent.Name == "RC Plane" then
  490. local posi = v.CFrame
  491. if v.Name == "Torso" then
  492. v.CFrame = CFrame.new(v.CFrame.p, MOUSE.Hit.p) + CFrame.new(v.CFrame.p, MOUSE.Hit.p).lookVector*speed
  493. elseif v.Name == "Head" then
  494. v.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  495. elseif v.Name == "LockOnDetector" then
  496. v.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  497. elseif v.Name == "Minigun1" then
  498. v.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
  499. elseif v.Name == "Minigun2" then
  500. v.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
  501. elseif v.Name == "Missile1" then
  502. v.CFrame = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  503. elseif v.Name == "Missile2" then
  504. v.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  505. end
  506. local pos = v.CFrame * CFrame.new(0,0.4,0) - v.CFrame.lookVector*1.2
  507. local pos2 = (pos.lookVector*speed) + (pos.lookVector*1.2)
  508. local ray = Ray.new(pos.p, (pos.lookVector*speed))
  509. local hitz, enz = workspace:findPartOnRay(ray, char)
  510. if hitz ~= nil and hitz.CanCollide == true and hitz.Name ~= "MiniBullit" then
  511. Spawn(function() Splosion(enz, 1.5*speed, 6, 3, 4) end)
  512. v:remove()
  513. PlaneTab[i] = nil
  514. pcall(function() Cancel() Build() end)
  515. end
  516. if hu.Health == 0 then
  517. Spawn(function() Splosion(enz, 3, 7, 5, 2.5) end)
  518. v:remove()
  519. PlaneTab[i] = nil
  520. pcall(function() Cancel() Build() end)
  521. end
  522. if v.Name == "Torso" and streamline == true then
  523. local e = P:Clone()
  524. e.Parent = Main.Parent
  525. e.Anchored = true
  526. e.Transparency = 0.3
  527. e.BrickColor = StreamlineColor
  528. local posit = posi * CFrame.new(0,0.8,0)
  529. e.CFrame = posit * CFrame.Angles(math.pi/2,0,0)
  530. local mesh = Instance.new("BlockMesh", e)
  531. mesh.Name = "Mesh"
  532. mesh.Scale = Vector3.new(0.4,speed*2,0.4)
  533. table.insert(EffectTab, e)
  534. end
  535. end
  536. end
  537. end
  538. end
  539.  
  540. for i, v in pairs(EffectTab) do
  541. if v ~= nil and v.Parent ~= nil then
  542. v.Transparency = v.Transparency + 0.036
  543. v.Mesh.Scale = v.Mesh.Scale + Vector3.new(0.225*speed,0,0.225*speed)
  544. if v.Transparency > 0.94 then
  545. v:Destroy()
  546. EffectTab[i] = nil
  547. end
  548. end
  549. end
  550.  
  551. if iii%4 == 0 then
  552. if Shooting == true then
  553. for III = 1, 2 do
  554. for i, v in pairs(PlaneTab) do
  555. if v.Name == "Minigun1" or v.Name == "Minigun2" then
  556. if sidez == true or sidez == false then
  557. local R = P:Clone()
  558. R.Name = "MiniBullit"
  559. game:service("Debris"):AddItem(R, 3)
  560. R.BrickColor = BrickColor.new("New Yeller")
  561. R.Anchored = true
  562. local mesh = Instance.new("CylinderMesh", R)
  563. mesh.Scale = Vector3.new(0.15,bulletspeed,0.1)
  564. if sidez == true then
  565. if v.Name == "Minigun1" then
  566. MinigunSound:Play()
  567. R.CFrame = v.CFrame * CFrame.Angles(-math.pi/2,0,0)
  568. table.insert(RayTab, R)
  569. R.Parent = Main.Parent
  570. end
  571. sidez = "1"
  572. break
  573. elseif sidez == false then
  574. if v.Name == "Minigun2" then
  575. MinigunSound:Play()
  576. R.CFrame = v.CFrame * CFrame.Angles(-math.pi/2,0,0)
  577. table.insert(RayTab, R)
  578. R.Parent = Main.Parent
  579. sidez = "2"
  580. break
  581. end
  582. end
  583. end
  584. end
  585. end
  586. end
  587. end
  588. end
  589. if sidez == "1" then
  590. sidez = false
  591. elseif sidez == "2" then
  592. sidez = true
  593. end
  594.  
  595. for ii, v in pairs(RayTab) do
  596. if v.Name == "MiniBullit" then
  597. local pozi = v.CFrame * CFrame.Angles(math.pi/2,0,0)
  598. local ray = Ray.new(v.CFrame.p, pozi.lookVector*(bulletspeed+speed))
  599. local hitz, enz = workspace:findPartOnRay(ray, char)
  600. if hitz ~= nil then
  601. v:remove()
  602. RayTab[ii] = nil
  603. if hitz.Parent:findFirstChild("Humanoid") ~= nil then
  604. hitz.Parent:findFirstChild("Humanoid").Health = hitz.Parent:findFirstChild("Humanoid").Health - 10
  605. elseif hitz.Name == "Handle" and hitz.Parent.Parent:findFirstChild("Humanoid") then
  606. hitz.Parent.Parent:findFirstChild("Humanoid").Health = hitz.Parent.Parent:findFirstChild("Humanoid").Health - 10
  607. end
  608. end
  609. v.CFrame = v.CFrame * CFrame.new(0,(bulletspeed+speed),0)
  610. elseif v.Name == "Bomb" then
  611. local pozi = v.CFrame
  612. local ray = Ray.new(pozi.p, (pozi * CFrame.new(0,0,1)).lookVector*(bombdropspeed))
  613. local hitz, enz = workspace:findPartOnRay(ray, char)
  614. if hitz ~= nil then
  615. BombSound:Play()
  616. Spawn(function() Splosion(enz, 3,7,3, 8) end)
  617. v:remove()
  618. RayTab[ii] = nil
  619. end
  620. v.CFrame = v.CFrame * CFrame.new(0,0,-bombdropspeed)
  621. end
  622. if v.Parent ~= Main.Parent then
  623. RayTab[ii] = nil
  624. end
  625. end
  626.  
  627. if speedup == true then
  628. speed = speed + acceleration
  629. if speed > maxspeed then
  630. speed = maxspeed
  631. end
  632. end
  633. if speeddown == true then
  634. speed = speed - acceleration
  635. if speed < 0.2 then
  636. speed = 0.2
  637. end
  638. end
  639. n.Text = "Speed: "..speed.."/"..maxspeed
  640. n2.Size = UDim2.new(speed/maxspeed,0,1,0)
  641. local colurz = 0.55/maxspeed*speed
  642. n2.BackgroundColor3 = Color3.new(colurz,0.55-colurz,0)
  643. n3.Size = UDim2.new((hu.Health/hu.MaxHealth)*1.6,0,0.5,0)
  644. local colurz = 0.6/hu.MaxHealth*hu.Health
  645. n3.BackgroundColor3 = Color3.new(0.6-colurz,colurz,0)
  646. ff.Text = "Plane Health: " .. hu.Health .. "/" .. hu.MaxHealth
  647.  
  648. wait(0.025)
  649. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement