CreeperReaper48

Plane script

Dec 15th, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. 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 --https://github.com/Mokiros/roblox-FE-compatibility
  5.  
  6. local char = game.Players.LocalPlayer.Character
  7.  
  8.  
  9. local player = game.Players.LocalPlayer
  10. repeat wait() until player.Character.Humanoid
  11. local humanoid = player.Character.Humanoid
  12. local mouse = player:GetMouse()
  13.  
  14. local weld = Instance.new("Weld",char.Torso)
  15. weld.Part0 = char.Torso
  16.  
  17. local plane = Instance.new("Part",char.Torso)
  18. plane.Anchored = false
  19. plane.CanCollide = false
  20. plane.Size = Vector3.new(3,2,6)
  21. plane.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  22. weld.Part1 = plane
  23. weld.C1 = CFrame.new(0,0.5,0) * CFrame.Angles(0,math.rad(270),0)
  24.  
  25. local pf = Instance.new("ForceField")
  26. pf.Parent = game.Players.LocalPlayer.Character
  27.  
  28. for i,v in pairs(char.Torso:GetChildren()) do
  29.    if v.ClassName == 'Decal' then
  30.         v:Destroy()
  31.    end
  32. end
  33. for i,v in pairs(char:GetChildren()) do
  34.    if v.ClassName == 'Hat' then
  35.        v:Destroy()
  36.    end
  37. end
  38. for i,v in pairs(char.Head:GetChildren()) do
  39.    if v.ClassName == 'Decal' then
  40.        v:Destroy()
  41.    end
  42. end
  43.  
  44. char.Humanoid.JumpPower = 200
  45. char.Humanoid.Jump = true
  46.  
  47. local plane = Instance.new('SpecialMesh', plane)
  48. plane.MeshType = 'FileMesh'
  49. plane.MeshId = 'http://www.roblox.com/asset/?id=498194022' --498194022
  50. plane.TextureId = 'http://www.roblox.com/asset/?id=498194025'
  51. plane.Scale = Vector3.new(0.2, 0.2, 0.2)
  52.  
  53.  
  54. planesound=Instance.new('Sound', char.Torso)
  55. planesound.SoundId = 'rbxassetid://439771510'
  56. planesound.Volume = 1
  57. planesound.Looped = true
  58.  
  59. pullup=Instance.new('Sound', char.Torso)
  60. pullup.SoundId = 'rbxassetid://144560522'
  61. pullup.Volume = 10
  62. pullup.Looped = true
  63.  
  64. alarm=Instance.new('Sound', char.Torso)
  65. alarm.SoundId = 'rbxassetid://384231761'
  66. alarm.Volume = 10
  67. alarm.Looped = true
  68.  
  69.  
  70. screech=Instance.new('Sound', char.Torso)
  71. screech.SoundId = 'rbxassetid://262353320'
  72. screech.Volume = 10
  73.  
  74. st=Instance.new('Sound', char.Torso)
  75. st.SoundId = 'rbxassetid://131353021'
  76. st.Volume = 20
  77.  
  78. allahuakbar=Instance.new('Sound', char)
  79. allahuakbar.SoundId = 'rbxassetid://293292782'
  80. allahuakbar.Volume = 10
  81.  
  82. moosic=Instance.new('Sound', char)
  83. moosic.SoundId = 'rbxassetid://504630746'
  84. moosic.Volume = 2
  85.  
  86. allahuakbar2=Instance.new('Sound', char)
  87. allahuakbar2.SoundId = 'rbxassetid://446824013' --446824013
  88. allahuakbar2.Volume = 1
  89.  
  90.  
  91. planesound:Play()
  92.  
  93. explosionf=Instance.new('ParticleEmitter', char.Torso)
  94. explosionf.Texture = 'http://www.roblox.com/asset/?id=244514357'
  95. explosionf.Size = NumberSequence.new(19)
  96. explosionf.Rate = 1000
  97. explosionf.LightEmission = 0.4
  98. explosionf.Lifetime = NumberRange.new(1)
  99. explosionf.VelocitySpread = 360
  100. explosionf.Enabled = false
  101.  
  102.  
  103.  
  104. char.Torso.Transparency = 1
  105. char.Head.Transparency = 1
  106. char['Left Arm'].Transparency = 1
  107. char['Right Arm'].Transparency = 1
  108. char['Left Leg'].Transparency = 1
  109. char['Right Leg'].Transparency = 1
  110.  
  111. 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
  112. local Me = game:GetService("Players").LocalPlayer
  113. local Char = Me.Character
  114. local Mouse = Me:GetMouse()
  115. local Cam = Workspace.CurrentCamera
  116. local Stop = false
  117. local Version = 0
  118. local MaxSpeed = 8
  119. local Speed = 8
  120. local Keys = {}
  121. local Force = 10000 -- 10000 = Fly, 1000000 = Noclip
  122.  
  123. local Fly, Rot = Char.Torso:FindFirstChild("LMMFly"), Char.Torso:FindFirstChild("LMMRot")
  124. if Fly then Fly:Destroy() end if Rot then Rot:Destroy() end
  125. Fly = Instance.new("BodyPosition", Char.Torso) Fly.Name = "LMMFly" Fly.maxForce = Vector3.new(math.huge, math.huge, math.huge) Fly.P = Force Fly.position = Char.Torso.Position
  126. Rot = Instance.new("BodyGyro", Char.Torso) Rot.Name = "LMMRot" Rot.maxTorque = Vector3.new(math.huge, math.huge, math.huge) Rot.P = Force Rot.cframe = Cam.CoordinateFrame
  127.  
  128. local Thread,Old = Version, nil
  129. Char.Humanoid.PlatformStand = true
  130.  
  131. function StopFly()
  132. Version = Version + 1 Stop = true Char.Humanoid.PlatformStand = false Fly:Destroy() Rot:Destroy() script.Disabled = true script:Destroy()
  133. end
  134.  
  135. Char.ChildAdded:connect(function(Obj) wait()
  136. if Obj.Name == "LM".."MFlyStop" then
  137. Obj:Destroy()
  138. StopFly()
  139. end
  140. end)
  141.  
  142. coroutine.wrap(function() while Thread == Version and Stop == false do
  143. local Vectoring = Rot.cframe - Rot.cframe.p + Fly.position
  144.  
  145. if Keys[string.char(48)] then Speed = 1 end
  146. if Keys.w then Vectoring = Vectoring + Cam.CoordinateFrame.lookVector * Speed end
  147. if Keys.s then Vectoring = Vectoring - Cam.CoordinateFrame.lookVector * Speed end
  148. if Keys.d then Vectoring = Vectoring * CFrame.new(Speed,0,0) end
  149. if Keys.a then Vectoring = Vectoring * CFrame.new(-Speed,0,0) end
  150. if Keys.e or Keys[" "] then Vectoring = Vectoring * CFrame.new(0,Speed,0) end
  151. if Keys.q then Vectoring = Vectoring * CFrame.new(0,-Speed,0) end
  152. if Keys.x then StopFly() end
  153.  
  154. if Old ~= Vectoring then
  155. Fly.position = Vectoring.p
  156. Old = Vectoring
  157. Speed = math.min(Speed + Speed*0.025,MaxSpeed)
  158. else
  159. Speed = 1;
  160. end
  161. Rot.cframe = Cam.CoordinateFrame
  162. wait(0.01)
  163. end end)()
  164.  
  165. Mouse.KeyDown:connect(function(Key)
  166. Keys[Key] = true
  167. end)
  168. Mouse.KeyUp:connect(function(Key)
  169. Keys[Key] = false
  170. end)
  171.  
  172.  
  173. mouse.KeyDown:connect(function(key)
  174. if key == "c" then
  175. planesound:Stop()
  176. screech:Play()
  177. allahuakbar2:Stop()
  178. pullup:Stop()
  179. explosionf.Enabled = false
  180. alarm:Stop()
  181. local e = Instance.new("Smoke", char.Torso)
  182. e.Size = 20
  183. char.Torso.Anchored = false
  184. wait(3)
  185. e.Enabled = false
  186.  
  187. end
  188. end)
  189.  
  190. mouse.KeyDown:connect(function(key)
  191. if key == "v" then
  192. explosionf.Enabled = true
  193. pullup:Play()
  194. alarm:Play()
  195. explosionf.Size = NumberSequence.new(5)
  196. end
  197. end)
  198.  
  199. mouse.KeyDown:connect(function(key)
  200. if key == "b" then
  201. moosic:Play()
  202. end
  203. end)
  204.  
  205. mouse.KeyDown:connect(function(key)
  206. if key == "n" then
  207. moosic:Stop()
  208. end
  209. end)
  210.  
  211. mouse.KeyDown:connect(function(key)
  212. if key == "z" then
  213. planesound:Play()
  214. screech:Stop()
  215. char.Torso.Anchored = false
  216. st:Play()
  217. allahuakbar2:Stop()
  218. pullup:Stop()
  219. explosionf.Enabled = false
  220. alarm:Stop()
  221.  
  222.  
  223. end
  224. end)
  225.  
  226. Enabled = false
  227. function onTouched(hit)
  228. if Enabled then
  229. return
  230. end
  231. Enabled=false
  232. local e = Instance.new("Explosion")
  233. e.BlastRadius = 260-- How much ground the explosion covers --
  234. e.BlastPressure = 51-- How powerful the explosion is --
  235. e.Parent = char.Torso -- Don't change this!
  236. e.Position = char.Torso.Position -- Don't change this!
  237. allahuakbar:Play()
  238. explosionf.Size = NumberSequence.new(50)
  239. explosionf.Speed = NumberRange.new(30)
  240. explosionf.Enabled = true
  241. char.Torso.Anchored = true
  242. explosionf.Lifetime = NumberRange.new(0.25)
  243. allahuakbar2:Play()
  244. allahuakbar2.Pitch = 0
  245. pullup:Stop()
  246. alarm:Stop()
  247. wait(1.25)
  248. allahuakbar2.Pitch = 0
  249. explosionf.Enabled = false
  250. planesound:Stop()
  251. wait(0.50)
  252. plr = game.Players.LocalPlayer.Name
  253. for i,v in pairs(game.Players:GetChildren()) do
  254.        if v.Name ~= plr then
  255. game:GetService("Chat"):Chat(v.Character.Head, "ALLAHU AKBAR!!! HEIL PLANE CRASHES!!!", Enum.ChatColor.Blue)
  256. AKBAR=Instance.new('Sound', v.Character.Head)
  257. AKBAR.SoundId = 'rbxassetid://396873260'
  258. AKBAR.Volume = 15
  259. AKBAR.Pitch = 0.25
  260. AKBAR.Looped = false
  261. AKBAR:Play()
  262. wait(2.6)
  263. AKBAR:Play()
  264.  
  265. end
  266. end
  267.  
  268. end
  269. char.Torso.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment