awzp

RC Plane (not by me) (pretty cool tho)

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