Advertisement
Just_A_Name

Untitled

May 3rd, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.63 KB | None | 0 0
  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
  6.  
  7. ----- Made by DoogleFox, Full credit to him
  8. script:ClearAllChildren()
  9. for i, v in pairs(game.Players.LocalPlayer.Backpack:children()) do
  10. if v.className == "HopperBin" and v.Name == "Plane" then
  11. v:remove()
  12. end
  13. end
  14. bin = Instance.new("HopperBin")
  15. bin.Name = "Plane"
  16. bin.Parent = game.Players.LocalPlayer.Backpack
  17. local hop = Instance.new("HopperBin")
  18. hop.Parent = nil
  19. script.Parent = hop
  20.  
  21. local StreamlineColor = BrickColor.new("Bright red")
  22. local bulletspeed = 7
  23. local bombdropspeed = 3
  24. local maxspeed = 1.8
  25. local acceleration = 0.02
  26.  
  27. local character = game.Players.LocalPlayer.Character
  28. local char = game.Players.LocalPlayer.Character
  29. local Torsoz = game.Players.LocalPlayer.Character:findFirstChild("Torso")
  30. local RA = game.Players.LocalPlayer.Character:findFirstChild("Right Arm")
  31. local LA = game.Players.LocalPlayer.Character:findFirstChild("Left Arm")
  32. local RL = game.Players.LocalPlayer.Character:findFirstChild("Right Leg")
  33. local LL = game.Players.LocalPlayer.Character:findFirstChild("Left Leg")
  34. local H = game.Players.LocalPlayer.Character:findFirstChild("Head")
  35. local RS = Torsoz:findFirstChild("Right Shoulder")
  36. local LS = Torsoz:findFirstChild("Left Shoulder")
  37. local RH = Torsoz:findFirstChild("Right Hip")
  38. local LH = Torsoz:findFirstChild("Left Hip")
  39. local N = Torsoz:findFirstChild("Neck")
  40. local Main
  41. local Joint1
  42. local PlaneActive = false
  43. local Flying = false
  44. local PlaneTab = {}
  45. local EffectTab = {}
  46. local RayTab = {}
  47. local LastPart
  48. local speed = 0.5
  49. local MOUSE
  50. local hu = Instance.new("Humanoid")
  51. local speedup = false
  52. local speeddown = false
  53. local streamline = false
  54. local Shooting = false
  55. local CanDropBomb = true
  56. local MinigunSound
  57. local BombSound
  58. local LockOnTarget
  59.  
  60. local P = Instance.new("Part")
  61. P.Anchored = false
  62. P.CanCollide = false
  63. P.Name = "Part"
  64. P.formFactor = "Custom"
  65. P.Size = Vector3.new(0.5,0.5,0.5)
  66. P.Locked = true
  67. P.TopSurface = 0
  68. P.BottomSurface = 0
  69.  
  70. local gui = Instance.new("ScreenGui")
  71. gui.Name = "PlaneSpeedGui"
  72. local f = Instance.new("Frame", gui)
  73. f.Name = "Meter"
  74. f.Position = UDim2.new(0.45,0,0.75,0)
  75. f.Size = UDim2.new(0.1,0,0.05,0)
  76. f.BackgroundColor = BrickColor.new("Really black")
  77. f.BorderColor = BrickColor.new("Dark stone grey")
  78. local n = Instance.new("TextLabel", f)
  79. n.Name = "Meter"
  80. n.Position = UDim2.new(0,0,0,0)
  81. n.Size = UDim2.new(1,0,1,0)
  82. n.BackgroundColor = BrickColor.new("Really black")
  83. n.TextColor = BrickColor.new("White")
  84. n.BorderColor = BrickColor.new("Dark stone grey")
  85. n.BackgroundTransparency = 1
  86. n.FontSize = 3
  87. n.Text = "Speed: "..speed.."/"..maxspeed
  88. n.ZIndex = 2
  89. local ff = n:Clone()
  90. ff.Parent = f
  91. ff.BackgroundTransparency = 0
  92. ff.Position = UDim2.new(-0.3,0,0,0)
  93. ff.Size = UDim2.new(0.3,0,1,0)
  94. ff.Text = "Q"
  95. local ff = n:Clone()
  96. ff.Parent = f
  97. ff.BackgroundTransparency = 0
  98. ff.Position = UDim2.new(1,0,0,0)
  99. ff.Size = UDim2.new(0.3,0,1,0)
  100. ff.Text = "E"
  101. local ff = n:Clone()
  102. ff.Parent = f
  103. ff.BackgroundTransparency = 0
  104. ff.Position = UDim2.new(-0.3,0,1,0)
  105. ff.Size = UDim2.new(1.6,0,0.5,0)
  106. ff.FontSize = 1
  107. ff.Text = "F To Toggle Streamline"
  108. local n2 = Instance.new("Frame", f)
  109. n2.Name = "MeterBar"
  110. n2.Position = UDim2.new(0,0,0,0)
  111. n2.Size = UDim2.new(0,0,1,0)
  112. n2.BackgroundColor3 = Color3.new(0,0,0)
  113. n2.BorderColor = BrickColor.new("Dark stone grey")
  114. n2.ZIndex = 1
  115. local ff = n:Clone()
  116. ff.Parent = f
  117. ff.Position = UDim2.new(-0.3,0,1.5,0)
  118. ff.Size = UDim2.new(1.6,0,0.5,0)
  119. ff.FontSize = 1
  120. ff.Text = "Plane Health: 0"
  121. local n3 = Instance.new("Frame", f)
  122. n3.Name = "MeterBar"
  123. n3.Position = UDim2.new(-0.3,0,1.5,0)
  124. n3.Size = UDim2.new(1,0,0.5,0)
  125. n3.BackgroundColor3 = Color3.new(0,1,0)
  126. n3.BorderColor = BrickColor.new("Dark stone grey")
  127. n3.ZIndex = 1
  128.  
  129. function Build()
  130. for i, v in pairs(char:children()) do
  131. if v.className == "Model" and v.Name == "Plane" then
  132. v:remove()
  133. end
  134. end
  135. local mdl2 = Instance.new("Model", char)
  136. mdl2.Name = "Plane"
  137. local mdl = Instance.new("Model", mdl2)
  138. mdl.Name = "RC Plane"
  139.  
  140. local h = P:Clone()
  141. h.Name = "Torso"
  142. h.Parent = mdl
  143. h.Position = Torsoz.Position
  144. h.Size = Vector3.new(1.9,1,1.9)
  145. local mesh = Instance.new("SpecialMesh", h)
  146. mesh.Name = "Mesh"
  147. mesh.MeshId = "http://www.roblox.com/asset/?id=68752248"
  148. mesh.TextureId = "http://www.roblox.com/asset/?id=77082085"
  149. --- 77082085 black plane
  150. --- 69308394 original
  151. mesh.Scale = Vector3.new(9,9,9)
  152. local w = Instance.new("Motor", h)
  153. w.Part0 = Torsoz
  154. w.Part1 = h
  155. w.C0 = CFrame.new(0,0,0.1) * CFrame.Angles(math.pi/2,-math.pi/4,0)
  156. Main = w
  157. local h2 = P:Clone()
  158. h2.Name = "Controller"
  159. h2.Parent = mdl
  160. h2.Position = Torsoz.Position
  161. h2.Size = Vector3.new(0.5,0.5,0.5)
  162. local mesh = Instance.new("SpecialMesh", h2)
  163. mesh.Name = "Mesh"
  164. mesh.MeshId = "http://www.roblox.com/asset/?id=31183234"
  165. mesh.TextureId = "http://www.roblox.com/asset/?id=31183303"
  166. mesh.Scale = Vector3.new(0.5,0.5,0.5)
  167. local w = Instance.new("Motor", h2)
  168. w.Part0 = RL
  169. w.Part1 = h2
  170. w.C0 = CFrame.new(0.5,0.8,0) * CFrame.Angles(0,-math.pi/2,0)
  171. Main2 = w
  172.  
  173. end
  174. Build()
  175.  
  176. function Launch(mouse)
  177. MOUSE = mouse
  178. PlaneActive = true
  179. local p = P:Clone()
  180. p.Parent = Torsoz
  181. p.Transparency = 1
  182. local w = Instance.new("Motor", p)
  183. w.Part0 = p
  184. w.Part1 = RA
  185. w.C0 = CFrame.new(0,-0.5,0)
  186. RS.Part0 = nil
  187. Joint1 = Instance.new("Motor", p)
  188. Joint1.Part0 = Torsoz
  189. Joint1.Part1 = p
  190. Joint1.C0 = CFrame.new(1.5,0.5,0)
  191.  
  192. local jointz = Joint1
  193. for i = 1, 14 do
  194. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi*1.2/14,0,0)
  195. wait()
  196. end
  197. wait() wait()
  198. Main.Part0 = RA
  199. Main.C0 = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(0,math.pi,math.pi) * CFrame.Angles(-math.pi*0.2,0,0)
  200. wait() wait()
  201. for i = 1, 3 do
  202. Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,0.2/3,0)
  203. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
  204. wait()
  205. end
  206. for i = 1, 2 do
  207. Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,0,0)
  208. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
  209. wait()
  210. end
  211. for i = 1, 2 do
  212. Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,-0.5/2,0)
  213. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
  214. wait()
  215. end
  216. Main.Part0 = nil
  217. speed = 0.4
  218. Main.Parent.Anchored = true
  219. local h = P:Clone()
  220. h.Size = Vector3.new(4,2.4,3.25)
  221. h.Parent = Main.Parent.Parent
  222. h.Transparency = 0.99
  223. h.Name = "Head"
  224. h.CFrame = Main.Parent.CFrame
  225. MinigunSound = Instance.new("Sound", h)
  226. MinigunSound.Pitch = 1.75
  227. MinigunSound.Volume = 0.3
  228. MinigunSound.SoundId = "http://www.roblox.com/asset/?id=2691586"
  229. BombSound = Instance.new("Sound", h)
  230. BombSound.Pitch = 0.875
  231. BombSound.Volume = 0.5
  232. BombSound.SoundId = "http://www.roblox.com/asset/?id=2233908"
  233. -- old sound: http://www.roblox.com/asset/?id=2233908
  234. -- new sound: http://www.roblox.com/asset/?id=81116747
  235. local mesh = Instance.new("BlockMesh", h)
  236. mesh.Scale = Vector3.new(0.03,0.03,0.03)
  237. local w = Instance.new("Snap", h)
  238. w.Part0 = Main.Parent
  239. w.Part1 = h
  240. hu = Instance.new("Humanoid", Main.Parent.Parent)
  241. hu.MaxHealth = 100
  242. wait()
  243. hu.Health = 100
  244. local h2 = P:Clone()
  245. h2.Anchored = true
  246. h2.BrickColor = BrickColor.new("Really black")
  247. h2.Parent = Main.Parent.Parent
  248. h2.Name = "Minigun1"
  249. h2.CFrame = Main.Parent.CFrame
  250. local mesh = Instance.new("SpecialMesh", h2)
  251. mesh.Scale = Vector3.new(0.3,0.3,0.3)
  252. mesh.MeshId = "http://www.roblox.com/asset/?id=2806162"
  253. local h3 = P:Clone()
  254. h3.Anchored = true
  255. h3.BrickColor = BrickColor.new("Really black")
  256. h3.Parent = Main.Parent.Parent
  257. h3.Name = "Minigun2"
  258. h3.CFrame = Main.Parent.CFrame
  259. local mesh = Instance.new("SpecialMesh", h3)
  260. mesh.Scale = Vector3.new(0.3,0.3,0.3)
  261. mesh.MeshId = "http://www.roblox.com/asset/?id=2806162"
  262. local h4 = P:Clone()
  263. h4.Anchored = true
  264. h4.BrickColor = BrickColor.new("Black")
  265. h4.Parent = Main.Parent.Parent
  266. h4.Name = "Missile1"
  267. h4.CFrame = Main.Parent.CFrame
  268. local mesh = Instance.new("SpecialMesh", h4)
  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 h5 = P:Clone()
  274. h5.Anchored = true
  275. h5.BrickColor = BrickColor.new("Black")
  276. h5.Parent = Main.Parent.Parent
  277. h5.Name = "Missile2"
  278. h5.CFrame = Main.Parent.CFrame
  279. local mesh = Instance.new("SpecialMesh", h5)
  280. mesh.Scale = Vector3.new(0.35,0.55,0.55)
  281. mesh.MeshId = "http://www.roblox.com/asset/?id=1030777"
  282. mesh.TextureId = "http://www.roblox.com/asset/?id=1030776"
  283. mesh.VertexColor = Vector3.new(0.45,0.45,0.45)
  284. local mdlz = Instance.new("Model", Main.Parent.Parent)
  285. mdlz.Name = "RC Plane"
  286. local h6 = P:Clone()
  287. h6.Shape = "Ball"
  288. h6.Size = Vector3.new(17,17,17)
  289. h6.Parent = mdlz
  290. h6.Anchored = true
  291. h6.Transparency = 0.99
  292. h6.Name = "LockOnDetector"
  293. h6.CFrame = Main.Parent.CFrame
  294. local mesh = Instance.new("SpecialMesh", h6)
  295. mesh.MeshType = "Sphere"
  296. mesh.Scale = Vector3.new(0.03,0.03,0.03)
  297.  
  298. for i = 1, 11 do
  299. Main.Parent.CFrame = Main.Parent.CFrame + Main.Parent.CFrame.lookVector*speed
  300. h.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  301. h2.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
  302. h3.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
  303. h4.CFrame = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  304. h5.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  305. h6.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  306. jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.5/11,0,0)
  307. wait()
  308. end
  309. Main2.Part0 = RA
  310. Main2.C0 = CFrame.new(0,-1,-0.8) * CFrame.Angles(math.pi/2,0,math.pi)
  311. for i = 1, 8 do
  312. Main.Parent.CFrame = Main.Parent.CFrame + Main.Parent.CFrame.lookVector*speed
  313. h.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  314. h2.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
  315. h3.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
  316. h4.CFrame = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  317. h5.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
  318. h6.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
  319. jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/2.2/8,0,0)
  320. Main2.C0 = Main2.C0 * CFrame.new(0.8/8,0,0)
  321. wait()
  322. end
  323.  
  324. PlaneTab[1] = Main.Parent
  325. PlaneTab[2] = h
  326. PlaneTab[3] = h2
  327. PlaneTab[4] = h3
  328. PlaneTab[5] = h4
  329. PlaneTab[6] = h5
  330. PlaneTab[7] = h6
  331. Flying = true
  332. workspace.CurrentCamera.CameraSubject = hu
  333. char.Humanoid.WalkSpeed = 0
  334. gui.Parent = game.Players.LocalPlayer:findFirstChild("PlayerGui")
  335.  
  336. end
  337.  
  338. function Cancel()
  339. LastPart = nil
  340. Joint1.Parent:Destroy()
  341. gui.Parent = nil
  342. workspace.CurrentCamera.CameraSubject = char.Humanoid
  343. char.Humanoid.WalkSpeed = 16
  344. RS.Part0 = Torsoz
  345. PlaneActive = false
  346. Flying = false
  347. Shooting = false
  348. for ii, vv in pairs(PlaneTab) do
  349. if vv.Parent.Name == "Plane" then
  350. vv:remove()
  351. PlaneTab[ii] = nil
  352. end
  353. end
  354. end
  355.  
  356. function onButton1Down(mouse)
  357. if Flying == true then
  358. Shooting = true
  359. end
  360. if PlaneActive == false then
  361. Launch(mouse)
  362. end
  363. end
  364.  
  365. function onButton1Up()
  366. Shooting = false
  367. end
  368.  
  369. function BombDrop()
  370. if CanDropBomb == true then
  371. CanDropBomb = false
  372. local B = P:Clone()
  373. B.Parent = Main.Parent
  374. B.Name = "Bomb"
  375. B.Anchored = true
  376. 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)
  377. game:service("Debris"):AddItem(B, 4)
  378. local mesh = Instance.new("SpecialMesh", B)
  379. mesh.MeshId = "http://www.roblox.com/asset/?id=74333739"
  380. mesh.TextureId = "http://www.roblox.com/asset/?id=74320150"
  381. table.insert(RayTab, B)
  382. Spawn(function() wait(0.5) CanDropBomb = true end)
  383. end
  384. end
  385.  
  386. function onKeyDown(key, mouse)
  387. if key == "e" then
  388. speedup = true
  389. elseif key == "q" then
  390. speeddown = true
  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 1
  428. PartZ = PartZ or 6
  429. LoopZ = LoopZ or 1
  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