Advertisement
lafur

Untitled

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