sIendytubble

plane 9/11

May 1st, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.41 KB | None | 0 0
  1. --[[
  2. hey so i edited this 9/11 plane script a bit so it works alot better but there are controls for the plane
  3. W - forward movement (obviously)
  4. S - backwards movement (obviously)
  5. U - upwards movement
  6. Q - downwards movement
  7. B - drop a bomb
  8. --]]
  9. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  10. local Player,game,owner = owner,game
  11. local RealPlayer = Player
  12. do
  13. print("FE Compatibility code by Mokiros")
  14. local rp = RealPlayer
  15. script.Parent = rp.Character
  16.  
  17. --RemoteEvent for communicating
  18. local Event = Instance.new("RemoteEvent")
  19. Event.Name = "UserInput_Event"
  20.  
  21. --Fake event to make stuff like Mouse.KeyDown work
  22. local function fakeEvent()
  23. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  24. t.connect = t.Connect
  25. return t
  26. end
  27.  
  28. --Creating fake input objects with fake variables
  29. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  30. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  31. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  32. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  33. end}
  34. --Merged 2 functions into one by checking amount of arguments
  35. CAS.UnbindAction = CAS.BindAction
  36.  
  37. --This function will trigger the events that have been :Connect()'ed
  38. local function te(self,ev,...)
  39. local t = m[ev]
  40. if t and t._fakeEvent then
  41. for _,f in pairs(t.Functions) do
  42. f(...)
  43. end
  44. end
  45. end
  46. m.TrigEvent = te
  47. UIS.TrigEvent = te
  48.  
  49. Event.OnServerEvent:Connect(function(plr,io)
  50. if plr~=rp then return end
  51. m.Target = io.Target
  52. m.Hit = io.Hit
  53. if not io.isMouse then
  54. local b = io.UserInputState == Enum.UserInputState.Begin
  55. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  56. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  57. end
  58. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  59. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  60. end
  61. for _,t in pairs(CAS.Actions) do
  62. for _,k in pairs(t.Keys) do
  63. if k==io.KeyCode then
  64. t.Function(t.Name,io.UserInputState,io)
  65. end
  66. end
  67. end
  68. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  69. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  70. end
  71. end)
  72. Event.Parent = NLS([==[
  73. local Player = game:GetService("Players").LocalPlayer
  74. local Event = script:WaitForChild("UserInput_Event")
  75. local Mouse = Player:GetMouse()
  76. local UIS = game:GetService("UserInputService")
  77. local input = function(io,a)
  78. if a then return end
  79. --Since InputObject is a client-side instance, we create and pass table instead
  80. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  81. end
  82. UIS.InputBegan:Connect(input)
  83. UIS.InputEnded:Connect(input)
  84. local h,t
  85. --Give the server mouse data 30 times every second, but only if the values changed
  86. --If player is not moving their mouse, client won't fire events
  87. while wait(1/30) do
  88. if h~=Mouse.Hit or t~=Mouse.Target then
  89. h,t=Mouse.Hit,Mouse.Target
  90. Event:FireServer({isMouse=true,Target=t,Hit=h})
  91. end
  92. end]==],Player.Character)
  93.  
  94. ----Sandboxed game object that allows the usage of client-side methods and services
  95. --Real game object
  96. local _rg = game
  97.  
  98. --Metatable for fake service
  99. local fsmt = {
  100. __index = function(self,k)
  101. local s = rawget(self,"_RealService")
  102. if s then
  103. return typeof(s[k])=="function"
  104. and function(_,...)return s[k](s,...)end or s[k]
  105. end
  106. end,
  107. __newindex = function(self,k,v)
  108. local s = rawget(self,"_RealService")
  109. if s then s[k]=v end
  110. end
  111. }
  112. local function FakeService(t,RealService)
  113. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  114. return setmetatable(t,fsmt)
  115. end
  116.  
  117. --Fake game object
  118. local g = {
  119. GetService = function(self,s)
  120. return rawget(self,s) or _rg:GetService(s)
  121. end,
  122. Players = FakeService({
  123. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  124. },"Players"),
  125. UserInputService = FakeService(UIS,"UserInputService"),
  126. ContextActionService = FakeService(CAS,"ContextActionService"),
  127. RunService = FakeService({
  128. _btrs = {},
  129. RenderStepped = _rg:GetService("RunService").Heartbeat,
  130. BindToRenderStep = function(self,name,_,fun)
  131. self._btrs[name] = self.Heartbeat:Connect(fun)
  132. end,
  133. UnbindFromRenderStep = function(self,name)
  134. self._btrs[name]:Disconnect()
  135. end,
  136. },"RunService")
  137. }
  138. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  139. g.service = g.GetService
  140. FakeService(g,game)
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144. -- by fr34ky;
  145. local char = owner.Character
  146.  
  147. moveforwardenabled = false
  148. moveupenabled = false
  149. movedownenabled = false
  150. movebackwardsenabled = false
  151. local player = owner
  152. repeat wait() until player.Character.Humanoid
  153. local humanoid = player.Character.Humanoid
  154. local mouse = player:GetMouse()
  155.  
  156. local weld = Instance.new("Weld",char.Torso)
  157. weld.Part0 = char.Torso
  158.  
  159. local pf = Instance.new("ForceField")
  160. pf.Parent = game.Players.LocalPlayer.Character
  161.  
  162. for i,v in pairs(char.Torso:GetChildren()) do
  163. if v.ClassName == 'Decal' then
  164. v:Destroy()
  165. end
  166. end
  167. for i,v in pairs(char:GetChildren()) do
  168. if v.ClassName == 'Accessory' then
  169. v:Destroy()
  170. end
  171. end
  172. for i,v in pairs(char.Head:GetChildren()) do
  173. if v.ClassName == 'Decal' then
  174. v:Destroy()
  175. end
  176. end
  177.  
  178. char.Humanoid.JumpPower = 200
  179. char.Humanoid.Jump = true
  180.  
  181. local plane = Instance.new('SpecialMesh', char.Torso)
  182. plane.MeshType = 'FileMesh'
  183. plane.MeshId = 'http://www.roblox.com/asset/?id=4791163583'
  184. plane.TextureId = 'http://www.roblox.com/asset/?id=4791164454'
  185. plane.Scale = Vector3.new(3, 3, 3)
  186.  
  187.  
  188. planesound=Instance.new('Sound', char.Torso)
  189. planesound.SoundId = 'rbxassetid://439771510'
  190. --planesound.Volume = 1
  191. planesound.Looped = true
  192.  
  193. pullup=Instance.new('Sound', char.Torso)
  194. pullup.SoundId = 'rbxassetid://144560522'
  195. pullup.Volume = 10
  196. pullup.Looped = true
  197.  
  198. alarm=Instance.new('Sound', char.Torso)
  199. alarm.SoundId = 'rbxassetid://384231761'
  200. alarm.Volume = 10
  201. alarm.Looped = true
  202.  
  203.  
  204. screech=Instance.new('Sound', char.Torso)
  205. screech.SoundId = 'rbxassetid://262353320'
  206. screech.Volume = 10
  207.  
  208. st=Instance.new('Sound', char.Torso)
  209. st.SoundId = 'rbxassetid://131353021'
  210. st.Volume = 20
  211.  
  212. allahuakbar=Instance.new('Sound', char)
  213. allahuakbar.SoundId = 'rbxassetid://293292782'
  214. allahuakbar.Volume = 10
  215.  
  216. moosic=Instance.new('Sound', char)
  217. moosic.SoundId = 'rbxassetid://165969964'
  218. moosic.Volume = 2
  219.  
  220. allahuakbar2=Instance.new('Sound', char)
  221. allahuakbar2.SoundId = 'rbxassetid://446824013' --446824013
  222. allahuakbar2.Volume = 1
  223.  
  224.  
  225. planesound:Play()
  226.  
  227. explosionf=Instance.new('ParticleEmitter', char.Torso)
  228. explosionf.Texture = 'http://www.roblox.com/asset/?id=244514357'
  229. explosionf.Size = NumberSequence.new(19)
  230. explosionf.Rate = 1000
  231. explosionf.LightEmission = 0.4
  232. explosionf.Lifetime = NumberRange.new(1)
  233. explosionf.VelocitySpread = 360
  234. explosionf.Enabled = false
  235.  
  236.  
  237.  
  238. char.Head.Transparency = 1
  239. char['Left Arm'].Transparency = 1
  240. char['Right Arm'].Transparency = 1
  241. char['Left Leg'].Transparency = 1
  242. char['Right Leg'].Transparency = 1
  243.  
  244. repeat wait(1)until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer:GetMouse() and game:FindService("Workspace") and game.Workspace.CurrentCamera
  245. local Me = game:GetService("Players").LocalPlayer
  246. local Char = Me.Character
  247. local Mouse = Me:GetMouse()
  248. local Cam = Workspace.CurrentCamera
  249. local Stop = false
  250. local Version = 0
  251. local MaxSpeed = 8
  252. local Speed = 8
  253. local Keys = {}
  254. local Force = 10000 -- 10000 = Fly, 1000000 = Noclip
  255.  
  256. game:GetService("RunService").RenderStepped:connect(function()
  257. if humanoid.Health > 0 then
  258. end
  259. end)
  260. NLS([[
  261. -- Created By FormerPocketLegender. Place in starterpack! This is a local script, so it won't work anywhere else :D
  262.  
  263. -- Go to line 57 to modify the hotkey to stop flying and to start flying again. I already set "e" to default, you can change it if you want.
  264.  
  265. -- Credit by a screen text gui or in game description is appreciated, or else I'll become sad ;(
  266.  
  267. repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  268. local mouse = game.Players.LocalPlayer:GetMouse()
  269. repeat wait() until mouse
  270. local plr = game.Players.LocalPlayer
  271. local torso = plr.Character.Torso
  272. local flying = true
  273. local deb = true
  274. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  275. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  276. local maxspeed = 200
  277. local speed = 0
  278. function Fly()
  279. local bg = Instance.new("BodyGyro", torso)
  280. bg.P = 9e4
  281. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  282. bg.cframe = torso.CFrame
  283. local bv = Instance.new("BodyVelocity", torso)
  284. bv.velocity = Vector3.new(0,0.1,0)
  285. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  286. repeat wait()
  287. plr.Character.Humanoid.PlatformStand = true
  288. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  289. speed = speed+5+(speed/maxspeed)
  290. if speed > maxspeed then
  291. speed = maxspeed
  292. end
  293. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  294. speed = speed-1
  295. if speed < 0 then
  296. speed = 0
  297. end
  298. end
  299. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  300. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  301. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  302. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  303. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  304. else
  305. bv.velocity = Vector3.new(0,0.1,0)
  306. end
  307. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*0*speed/maxspeed),0,0)
  308. until not flying
  309. ctrl = {f = 0, b = 0, l = 0, r = 0}
  310. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  311. speed = 0
  312. bg:Destroy()
  313. bv:Destroy()
  314. plr.Character.Humanoid.PlatformStand = false
  315. end
  316. mouse.KeyDown:connect(function(key)
  317. if key:lower() == "f" then
  318. if flying then flying = false
  319. else
  320. flying = true
  321. Fly()
  322. end
  323. elseif key:lower() == "w" then
  324. ctrl.f = 1
  325. elseif key:lower() == "s" then
  326. ctrl.b = -1
  327. elseif key:lower() == "a" then
  328. ctrl.l = -1
  329. elseif key:lower() == "d" then
  330. ctrl.r = 1
  331. end
  332. end)
  333. mouse.KeyUp:connect(function(key)
  334. if key:lower() == "w" then
  335. ctrl.f = 0
  336. elseif key:lower() == "s" then
  337. ctrl.b = 0
  338. elseif key:lower() == "a" then
  339. ctrl.l = 0
  340. elseif key:lower() == "d" then
  341. ctrl.r = 0
  342. end
  343. end)
  344. Fly()
  345. ]],char)
  346. mouse.KeyDown:connect(function(key)
  347. if key == "b" then
  348. bomb = Instance.new("Part",workspace)
  349. bomb.Name = "PlaneBomb"
  350. bomb.Position = char.Torso.Position - Vector3.new(0,5,0)
  351. bomb.Size = Vector3.new(4,4,4)
  352. bomb.Touched:connect(function(part)
  353. if part.Parent ~= char then
  354. local Explosion = Instance.new("Explosion",workspace)
  355. Explosion.Position = bomb.Position
  356. Explosion.BlastPressure = 100000
  357. Explosion.DestroyJointRadiusPercent = 0.7
  358. Explosion.ExplosionType = "CratersAndDebris"
  359. Explosion.BlastRadius = 50
  360. Explosion.Hit:connect(function(Hit, Distance)
  361. if Hit.Parent ~= char then
  362. Hit.Anchored = false
  363. Hit:BreakJoints()
  364. end
  365. end)
  366. end
  367. end)
  368. end
  369. end)
  370. mouse.KeyUp:connect(function(key)
  371. if key == "w" then
  372. moveforwardenabled = false
  373. end
  374. end)
  375. mouse.KeyDown:connect(function(key)
  376. if key == "c" then
  377. planesound:Stop()
  378. screech:Play()
  379. allahuakbar2:Stop()
  380. pullup:Stop()
  381. explosionf.Enabled = false
  382. alarm:Stop()
  383. local e = Instance.new("Smoke", char.Torso)
  384. e.Size = 20
  385. char.Torso.Anchored = false
  386. wait(3)
  387. e.Enabled = false
  388.  
  389. end
  390. end)
  391.  
  392. Enabled = false
  393. function onTouched(hit)
  394. if hit.Name ~= "PlaneBomb" and Enabled == false then
  395. Enabled=true
  396. local e = Instance.new("Explosion")
  397. e.BlastRadius = 260-- How much ground the explosion covers --
  398. e.BlastPressure = 51-- How powerful the explosion is --
  399. e.Parent = workspace -- Don't change this!
  400. e.Position = char.HumanoidRootPart.Position -- Don't change this!
  401. e.Hit:Connect(function(part)
  402. part.Anchored = false
  403. part:BreakJoints()
  404. fire = Instance.new("Fire",part)
  405. part.BrickColor = BrickColor.new("Really black")
  406. coroutine.resume(coroutine.create(function()
  407. wait(3)
  408. part:remove()
  409. end))
  410. end)
  411. allahuakbar:Play()
  412. explosionf.Size = NumberSequence.new(50)
  413. explosionf.Speed = NumberRange.new(30)
  414. explosionf.Enabled = true
  415. char.Torso.Anchored = true
  416. explosionf.Lifetime = NumberRange.new(0.25)
  417. allahuakbar2:Play()
  418. allahuakbar2.Pitch = 0
  419. pullup:Stop()
  420. alarm:Stop()
  421. moosic:Play()
  422. plane.TextureId = "rbxassetid://2675785344"
  423. wait(1.25)
  424. allahuakbar2.Pitch = 0
  425. explosionf.Enabled = false
  426. planesound:Stop()
  427. wait(0.50)
  428. plr = owner.Name
  429. for i,v in pairs(game.Players:GetChildren()) do
  430. if v.Name ~= plr then
  431. game:GetService("Chat"):Chat(v.Character.Head, "ALLAHU AKBAR!! HEIL PLANE CRASHES!", Enum.ChatColor.Blue)
  432. AKBAR=Instance.new('Sound', v.Character.Head)
  433. AKBAR.SoundId = 'rbxassetid://707769915'
  434. AKBAR.Volume = 15
  435. AKBAR.Pitch = 1
  436. AKBAR.Looped = false
  437. AKBAR:Play()
  438. wait(2.6)
  439. AKBAR:Play()
  440.  
  441. end
  442. end
  443. end
  444. end
  445. char.HumanoidRootPart.Touched:connect(onTouched)
Add Comment
Please, Sign In to add comment