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