Advertisement
Rawscript

Untitled

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