Advertisement
toonrun123

9/11 fixed

Apr 9th, 2019
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.68 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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6.     print("FE Compatibility code by Mokiros")
  7.     local rp = RealPlayer
  8.     script.Parent = rp.Character
  9.    
  10.     --RemoteEvent for communicating
  11.     local Event = Instance.new("RemoteEvent")
  12.     Event.Name = "UserInput_Event"
  13.  
  14.     --Fake event to make stuff like Mouse.KeyDown work
  15.     local function fakeEvent()
  16.         local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  17.         t.connect = t.Connect
  18.         return t
  19.     end
  20.  
  21.     --Creating fake input objects with fake variables
  22.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  23.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26.     end}
  27.     --Merged 2 functions into one by checking amount of arguments
  28.     CAS.UnbindAction = CAS.BindAction
  29.  
  30.     --This function will trigger the events that have been :Connect()'ed
  31.     local function te(self,ev,...)
  32.         local t = m[ev]
  33.         if t and t._fakeEvent then
  34.             for _,f in pairs(t.Functions) do
  35.                 f(...)
  36.             end
  37.         end
  38.     end
  39.     m.TrigEvent = te
  40.     UIS.TrigEvent = te
  41.  
  42.     Event.OnServerEvent:Connect(function(plr,io)
  43.         if plr~=rp then return end
  44.         m.Target = io.Target
  45.         m.Hit = io.Hit
  46.         if not io.isMouse then
  47.             local b = io.UserInputState == Enum.UserInputState.Begin
  48.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50.             end
  51.             if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52.                 return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53.             end
  54.             for _,t in pairs(CAS.Actions) do
  55.                 for _,k in pairs(t.Keys) do
  56.                     if k==io.KeyCode then
  57.                         t.Function(t.Name,io.UserInputState,io)
  58.                     end
  59.                 end
  60.             end
  61.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63.         end
  64.     end)
  65.     Event.Parent = NLS([==[
  66.     local Player = game:GetService("Players").LocalPlayer
  67.     local Event = script:WaitForChild("UserInput_Event")
  68.     local Mouse = Player:GetMouse()
  69.     local UIS = game:GetService("UserInputService")
  70.     local input = function(io,a)
  71.         if a then return end
  72.         --Since InputObject is a client-side instance, we create and pass table instead
  73.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74.     end
  75.     UIS.InputBegan:Connect(input)
  76.     UIS.InputEnded:Connect(input)
  77.     local h,t
  78.     --Give the server mouse data 30 times every second, but only if the values changed
  79.     --If player is not moving their mouse, client won't fire events
  80.     while wait(1/30) do
  81.         if h~=Mouse.Hit or t~=Mouse.Target then
  82.             h,t=Mouse.Hit,Mouse.Target
  83.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  84.         end
  85.     end]==],Player.Character)
  86.  
  87.     ----Sandboxed game object that allows the usage of client-side methods and services
  88.     --Real game object
  89.     local _rg = game
  90.  
  91.     --Metatable for fake service
  92.     local fsmt = {
  93.         __index = function(self,k)
  94.             local s = rawget(self,"_RealService")
  95.             if s then
  96.                 return typeof(s[k])=="function"
  97.                 and function(_,...)return s[k](s,...)end or s[k]
  98.             end
  99.         end,
  100.         __newindex = function(self,k,v)
  101.             local s = rawget(self,"_RealService")
  102.             if s then s[k]=v end
  103.         end
  104.     }
  105.     local function FakeService(t,RealService)
  106.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  107.         return setmetatable(t,fsmt)
  108.     end
  109.  
  110.     --Fake game object
  111.     local g = {
  112.         GetService = function(self,s)
  113.             return self[s]
  114.         end,
  115.         Players = FakeService({
  116.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  117.         },"Players"),
  118.         UserInputService = FakeService(UIS,"UserInputService"),
  119.         ContextActionService = FakeService(CAS,"ContextActionService"),
  120.     }
  121.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  122.     g.service = g.GetService
  123.    
  124.     g.RunService = FakeService({
  125.         RenderStepped = _rg:GetService("RunService").Heartbeat,
  126.         BindToRenderStep = function(self,name,_,fun)
  127.             self._btrs[name] = self.Heartbeat:Connect(fun)
  128.         end,
  129.         UnbindFromRenderStep = function(self,name)
  130.             self._btrs[name]:Disconnect()
  131.         end,
  132.     },"RunService")
  133.  
  134.     setmetatable(g,fsmt)
  135.     --Changing owner to fake player object to support owner:GetMouse()
  136.     game,owner = g,g.Players.LocalPlayer
  137. end
  138.  
  139. local char = game.Players.LocalPlayer.Character
  140.  
  141.  
  142. local player = game.Players.LocalPlayer
  143. repeat wait() until player.Character.Humanoid
  144. local humanoid = player.Character.Humanoid
  145. local mouse = player:GetMouse()
  146.  
  147. local weld = Instance.new("Weld",char.Torso)
  148. weld.Part0 = char.Torso
  149.  
  150. local plane = Instance.new("Part",char.Torso)
  151. plane.Anchored = false
  152. plane.CanCollide = false
  153. plane.Size = Vector3.new(3,2,6)
  154. plane.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  155. weld.Part1 = plane
  156. weld.C1 = CFrame.new(0,0.5,0) * CFrame.Angles(0,math.rad(270),0)
  157.  
  158. local pf = Instance.new("ForceField")
  159. pf.Parent = game.Players.LocalPlayer.Character
  160.  
  161. for i,v in pairs(char.Torso:GetChildren()) do
  162.    if v.ClassName == 'Decal' then
  163.         v:Destroy()
  164.    end
  165. end
  166. for i,v in pairs(char:GetChildren()) do
  167.    if v.ClassName == 'Hat' then
  168.        v:Destroy()
  169.    end
  170. end
  171. for i,v in pairs(char.Head:GetChildren()) do
  172.    if v.ClassName == 'Decal' then
  173.        v:Destroy()
  174.    end
  175. end
  176.  
  177. char.Humanoid.JumpPower = 200
  178. char.Humanoid.Jump = true
  179.  
  180. local plane = Instance.new('SpecialMesh', plane)
  181. plane.MeshType = 'FileMesh'
  182. plane.MeshId = 'http://www.roblox.com/asset/?id=498194022' --498194022
  183. plane.TextureId = 'http://www.roblox.com/asset/?id=498194025'
  184. plane.Scale = Vector3.new(0.2, 0.2, 0.2)
  185.  
  186.  
  187. planesound=Instance.new('Sound', char.Torso)
  188. planesound.SoundId = 'rbxassetid://439771510'
  189. planesound.Volume = 1
  190. planesound.Looped = true
  191.  
  192. pullup=Instance.new('Sound', char.Torso)
  193. pullup.SoundId = 'rbxassetid://144560522'
  194. pullup.Volume = 10
  195. pullup.Looped = true
  196.  
  197. alarm=Instance.new('Sound', char.Torso)
  198. alarm.SoundId = 'rbxassetid://384231761'
  199. alarm.Volume = 10
  200. alarm.Looped = true
  201.  
  202.  
  203. screech=Instance.new('Sound', char.Torso)
  204. screech.SoundId = 'rbxassetid://262353320'
  205. screech.Volume = 10
  206.  
  207. st=Instance.new('Sound', char.Torso)
  208. st.SoundId = 'rbxassetid://131353021'
  209. st.Volume = 20
  210.  
  211. allahuakbar=Instance.new('Sound', char)
  212. allahuakbar.SoundId = 'rbxassetid://293292782'
  213. allahuakbar.Volume = 10
  214.  
  215. moosic=Instance.new('Sound', char)
  216. moosic.SoundId = 'rbxassetid://504630746'
  217. moosic.Volume = 2
  218.  
  219. allahuakbar2=Instance.new('Sound', char)
  220. allahuakbar2.SoundId = 'rbxassetid://446824013' --446824013
  221. allahuakbar2.Volume = 1
  222.  
  223.  
  224. planesound:Play()
  225.  
  226. explosionf=Instance.new('ParticleEmitter', char.Torso)
  227. explosionf.Texture = 'http://www.roblox.com/asset/?id=244514357'
  228. explosionf.Size = NumberSequence.new(19)
  229. explosionf.Rate = 1000
  230. explosionf.LightEmission = 0.4
  231. explosionf.Lifetime = NumberRange.new(1)
  232. explosionf.VelocitySpread = 360
  233. explosionf.Enabled = false
  234.  
  235.  
  236.  
  237. char.Torso.Transparency = 1
  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:GetService("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. local Fly, Rot = Char.Torso:FindFirstChild("LMMFly"), Char.Torso:FindFirstChild("LMMRot")
  257. if Fly then Fly:Destroy() end if Rot then Rot:Destroy() end
  258. 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
  259. 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
  260.  
  261. local Thread,Old = Version, nil
  262. Char.Humanoid.PlatformStand = true
  263.  
  264. function StopFly()
  265. Version = Version + 1 Stop = true Char.Humanoid.PlatformStand = false Fly:Destroy() Rot:Destroy() script.Disabled = true script:Destroy()
  266. end
  267.  
  268. Char.ChildAdded:connect(function(Obj) wait()
  269. if Obj.Name == "LM".."MFlyStop" then
  270. Obj:Destroy()
  271. StopFly()
  272. end
  273. end)
  274.  
  275. coroutine.wrap(function() while Thread == Version and Stop == false do
  276. local Vectoring = Rot.cframe - Rot.cframe.p + Fly.position
  277.  
  278. if Keys[string.char(48)] then Speed = 1 end
  279. if Keys.w then Vectoring = Vectoring + Cam.CoordinateFrame.lookVector * Speed end
  280. if Keys.s then Vectoring = Vectoring - Cam.CoordinateFrame.lookVector * Speed end
  281. if Keys.d then Vectoring = Vectoring * CFrame.new(Speed,0,0) end
  282. if Keys.a then Vectoring = Vectoring * CFrame.new(-Speed,0,0) end
  283. if Keys.e or Keys[" "] then Vectoring = Vectoring * CFrame.new(0,Speed,0) end
  284. if Keys.q then Vectoring = Vectoring * CFrame.new(0,-Speed,0) end
  285. if Keys.x then StopFly() end
  286.  
  287. if Old ~= Vectoring then
  288. Fly.position = Vectoring.p
  289. Old = Vectoring
  290. Speed = math.min(Speed + Speed*0.025,MaxSpeed)
  291. else
  292. Speed = 1;
  293. end
  294. Rot.cframe = Cam.CoordinateFrame
  295. wait(0.01)
  296. end end)()
  297.  
  298. Mouse.KeyDown:connect(function(Key)
  299. Keys[Key] = true
  300. end)
  301. Mouse.KeyUp:connect(function(Key)
  302. Keys[Key] = false
  303. end)
  304.  
  305.  
  306. mouse.KeyDown:connect(function(key)
  307. if key == "c" then
  308. planesound:Stop()
  309. screech:Play()
  310. allahuakbar2:Stop()
  311. pullup:Stop()
  312. explosionf.Enabled = false
  313. alarm:Stop()
  314. local e = Instance.new("Smoke", char.Torso)
  315. e.Size = 20
  316. char.Torso.Anchored = false
  317. wait(3)
  318. e.Enabled = false
  319.  
  320. end
  321. end)
  322.  
  323. mouse.KeyDown:connect(function(key)
  324. if key == "v" then
  325. explosionf.Enabled = true
  326. pullup:Play()
  327. alarm:Play()
  328. explosionf.Size = NumberSequence.new(5)
  329. end
  330. end)
  331.  
  332. mouse.KeyDown:connect(function(key)
  333. if key == "b" then
  334. moosic:Play()
  335. end
  336. end)
  337.  
  338. mouse.KeyDown:connect(function(key)
  339. if key == "n" then
  340. moosic:Stop()
  341. end
  342. end)
  343.  
  344. mouse.KeyDown:connect(function(key)
  345. if key == "z" then
  346. planesound:Play()
  347. screech:Stop()
  348. char.Torso.Anchored = false
  349. st:Play()
  350. allahuakbar2:Stop()
  351. pullup:Stop()
  352. explosionf.Enabled = false
  353. alarm:Stop()
  354.  
  355.  
  356. end
  357. end)
  358.  
  359. Enabled = false
  360. function onTouched(hit)
  361. if Enabled then
  362. return
  363. end
  364. Enabled=false
  365. local e = Instance.new("Explosion")
  366. e.BlastRadius = 260-- How much ground the explosion covers --
  367. e.BlastPressure = 51-- How powerful the explosion is --
  368. e.Parent = char.Torso -- Don't change this!
  369. e.Position = char.Torso.Position -- Don't change this!
  370. allahuakbar:Play()
  371. explosionf.Size = NumberSequence.new(50)
  372. explosionf.Speed = NumberRange.new(30)
  373. explosionf.Enabled = true
  374. char.Torso.Anchored = true
  375. explosionf.Lifetime = NumberRange.new(0.25)
  376. allahuakbar2:Play()
  377. allahuakbar2.Pitch = 0
  378. pullup:Stop()
  379. alarm:Stop()
  380. wait(1.25)
  381. allahuakbar2.Pitch = 0
  382. explosionf.Enabled = false
  383. planesound:Stop()
  384. wait(0.50)
  385. plr = game.Players.LocalPlayer.Name
  386. for i,v in pairs(game.Players:GetChildren()) do
  387.        if v.Name ~= plr then
  388. game:GetService("Chat"):Chat(v.Character.Head, "ALLAHU AKBAR!!! HEIL PLANE CRASHES!!!", Enum.ChatColor.Blue)
  389. AKBAR=Instance.new('Sound', v.Character.Head)
  390. AKBAR.SoundId = 'rbxassetid://396873260'
  391. AKBAR.Volume = 15
  392. AKBAR.Pitch = 0.25
  393. AKBAR.Looped = false
  394. AKBAR:Play()
  395. wait(2.6)
  396. AKBAR:Play()
  397.  
  398. end
  399. end
  400.  
  401. end
  402. char.Torso.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement