Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- -- by fr34ky;
- local char = game.Players.LocalPlayer.Character
- local player = game.Players.LocalPlayer
- repeat wait() until player.Character.Humanoid
- local humanoid = player.Character.Humanoid
- local mouse = player:GetMouse()
- local weld = Instance.new("Weld",char.Torso)
- weld.Part0 = char.Torso
- local plane = Instance.new("Part",char.Torso)
- plane.Anchored = false
- plane.CanCollide = false
- plane.Size = Vector3.new(3,2,6)
- plane.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
- weld.Part1 = plane
- weld.C1 = CFrame.new(0,0.5,0) * CFrame.Angles(0,math.rad(270),0)
- local pf = Instance.new("ForceField")
- pf.Parent = game.Players.LocalPlayer.Character
- for i,v in pairs(char.Torso:GetChildren()) do
- if v.ClassName == 'Decal' then
- v:Destroy()
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == 'Hat' then
- v:Destroy()
- end
- end
- for i,v in pairs(char.Head:GetChildren()) do
- if v.ClassName == 'Decal' then
- v:Destroy()
- end
- end
- char.Humanoid.JumpPower = 200
- char.Humanoid.Jump = true
- local plane = Instance.new('SpecialMesh', plane)
- plane.MeshType = 'FileMesh'
- plane.MeshId = 'http://www.roblox.com/asset/?id=498194022' --498194022
- plane.TextureId = 'http://www.roblox.com/asset/?id=498194025'
- plane.Scale = Vector3.new(0.2, 0.2, 0.2)
- planesound=Instance.new('Sound', char.Torso)
- planesound.SoundId = 'rbxassetid://439771510'
- planesound.Volume = 1
- planesound.Looped = true
- pullup=Instance.new('Sound', char.Torso)
- pullup.SoundId = 'rbxassetid://144560522'
- pullup.Volume = 10
- pullup.Looped = true
- alarm=Instance.new('Sound', char.Torso)
- alarm.SoundId = 'rbxassetid://384231761'
- alarm.Volume = 10
- alarm.Looped = true
- screech=Instance.new('Sound', char.Torso)
- screech.SoundId = 'rbxassetid://262353320'
- screech.Volume = 10
- st=Instance.new('Sound', char.Torso)
- st.SoundId = 'rbxassetid://131353021'
- st.Volume = 20
- allahuakbar=Instance.new('Sound', char)
- allahuakbar.SoundId = 'rbxassetid://293292782'
- allahuakbar.Volume = 10
- moosic=Instance.new('Sound', char)
- moosic.SoundId = 'rbxassetid://504630746'
- moosic.Volume = 2
- allahuakbar2=Instance.new('Sound', char)
- allahuakbar2.SoundId = 'rbxassetid://446824013' --446824013
- allahuakbar2.Volume = 1
- planesound:Play()
- explosionf=Instance.new('ParticleEmitter', char.Torso)
- explosionf.Texture = 'http://www.roblox.com/asset/?id=244514357'
- explosionf.Size = NumberSequence.new(19)
- explosionf.Rate = 1000
- explosionf.LightEmission = 0.4
- explosionf.Lifetime = NumberRange.new(1)
- explosionf.VelocitySpread = 360
- explosionf.Enabled = false
- char.Torso.Transparency = 1
- char.Head.Transparency = 1
- char['Left Arm'].Transparency = 1
- char['Right Arm'].Transparency = 1
- char['Left Leg'].Transparency = 1
- char['Right Leg'].Transparency = 1
- 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
- local Me = game:GetService("Players").LocalPlayer
- local Char = Me.Character
- local Mouse = Me:GetMouse()
- local Cam = Workspace.CurrentCamera
- local Stop = false
- local Version = 0
- local MaxSpeed = 8
- local Speed = 8
- local Keys = {}
- local Force = 10000 -- 10000 = Fly, 1000000 = Noclip
- local Fly, Rot = Char.Torso:FindFirstChild("LMMFly"), Char.Torso:FindFirstChild("LMMRot")
- if Fly then Fly:Destroy() end if Rot then Rot:Destroy() end
- 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
- 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
- local Thread,Old = Version, nil
- Char.Humanoid.PlatformStand = true
- function StopFly()
- Version = Version + 1 Stop = true Char.Humanoid.PlatformStand = false Fly:Destroy() Rot:Destroy() script.Disabled = true script:Destroy()
- end
- Char.ChildAdded:connect(function(Obj) wait()
- if Obj.Name == "LM".."MFlyStop" then
- Obj:Destroy()
- StopFly()
- end
- end)
- coroutine.wrap(function() while Thread == Version and Stop == false do
- local Vectoring = Rot.cframe - Rot.cframe.p + Fly.position
- if Keys[string.char(48)] then Speed = 1 end
- if Keys.w then Vectoring = Vectoring + Cam.CoordinateFrame.lookVector * Speed end
- if Keys.s then Vectoring = Vectoring - Cam.CoordinateFrame.lookVector * Speed end
- if Keys.d then Vectoring = Vectoring * CFrame.new(Speed,0,0) end
- if Keys.a then Vectoring = Vectoring * CFrame.new(-Speed,0,0) end
- if Keys.e or Keys[" "] then Vectoring = Vectoring * CFrame.new(0,Speed,0) end
- if Keys.q then Vectoring = Vectoring * CFrame.new(0,-Speed,0) end
- if Keys.x then StopFly() end
- if Old ~= Vectoring then
- Fly.position = Vectoring.p
- Old = Vectoring
- Speed = math.min(Speed + Speed*0.025,MaxSpeed)
- else
- Speed = 1;
- end
- Rot.cframe = Cam.CoordinateFrame
- wait(0.01)
- end end)()
- Mouse.KeyDown:connect(function(Key)
- Keys[Key] = true
- end)
- Mouse.KeyUp:connect(function(Key)
- Keys[Key] = false
- end)
- mouse.KeyDown:connect(function(key)
- if key == "c" then
- planesound:Stop()
- screech:Play()
- allahuakbar2:Stop()
- pullup:Stop()
- explosionf.Enabled = false
- alarm:Stop()
- local e = Instance.new("Smoke", char.Torso)
- e.Size = 20
- char.Torso.Anchored = false
- wait(3)
- e.Enabled = false
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "v" then
- explosionf.Enabled = true
- pullup:Play()
- alarm:Play()
- explosionf.Size = NumberSequence.new(5)
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "b" then
- moosic:Play()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "n" then
- moosic:Stop()
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "z" then
- planesound:Play()
- screech:Stop()
- char.Torso.Anchored = false
- st:Play()
- allahuakbar2:Stop()
- pullup:Stop()
- explosionf.Enabled = false
- alarm:Stop()
- end
- end)
- Enabled = false
- function onTouched(hit)
- if Enabled then
- return
- end
- Enabled=false
- local e = Instance.new("Explosion")
- e.BlastRadius = 260-- How much ground the explosion covers --
- e.BlastPressure = 51-- How powerful the explosion is --
- e.Parent = char.Torso -- Don't change this!
- e.Position = char.Torso.Position -- Don't change this!
- allahuakbar:Play()
- explosionf.Size = NumberSequence.new(50)
- explosionf.Speed = NumberRange.new(30)
- explosionf.Enabled = true
- char.Torso.Anchored = true
- explosionf.Lifetime = NumberRange.new(0.25)
- allahuakbar2:Play()
- allahuakbar2.Pitch = 0
- pullup:Stop()
- alarm:Stop()
- wait(1.25)
- allahuakbar2.Pitch = 0
- explosionf.Enabled = false
- planesound:Stop()
- wait(0.50)
- plr = game.Players.LocalPlayer.Name
- for i,v in pairs(game.Players:GetChildren()) do
- if v.Name ~= plr then
- game:GetService("Chat"):Chat(v.Character.Head, "ALLAHU AKBAR!!! HEIL PLANE CRASHES!!!", Enum.ChatColor.Blue)
- AKBAR=Instance.new('Sound', v.Character.Head)
- AKBAR.SoundId = 'rbxassetid://396873260'
- AKBAR.Volume = 15
- AKBAR.Pitch = 0.25
- AKBAR.Looped = false
- AKBAR:Play()
- wait(2.6)
- AKBAR:Play()
- end
- end
- end
- char.Torso.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement