Advertisement
Christoffer07700Extr

Flying Gorilla

Oct 13th, 2019
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.52 KB | None | 0 0
  1. print("FE code by Starzozero, Thanks to him!")
  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, Edited by StarzoZero")
  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 rawget(self,s) or _rg:GetService(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. RunService = FakeService({
  121. _btrs = {},
  122. RenderStepped = _rg:GetService("RunService").Heartbeat,
  123. BindToRenderStep = function(self,name,_,fun)
  124. self._btrs[name] = self.Heartbeat:Connect(fun)
  125. end,
  126. UnbindFromRenderStep = function(self,name)
  127. self._btrs[name]:Disconnect()
  128. end,
  129. },"RunService")
  130. }
  131. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  132. g.service = g.GetService
  133. FakeService(g,game)
  134. --Changing owner to fake player object to support owner:GetMouse()
  135. game,owner = g,g.Players.LocalPlayer
  136. end
  137.  
  138. --edit by christoffer077002
  139. --anti stop time by ttyyuu12345
  140.  
  141. local p = game.Players.LocalPlayer.Character
  142. local weld = Instance.new("Weld",p.Torso)
  143. weld.Part0 = p.Torso
  144.  
  145. local train = Instance.new("Part",p.Torso)
  146. train.Anchored = true
  147. train.CanCollide = false
  148. train.Size = Vector3.new(3,2,6)
  149. train.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  150. weld.Part1 = train
  151. weld.C1 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(180),0)
  152. train.Anchored = false
  153. local TrainMesh = Instance.new("SpecialMesh",train)
  154. TrainMesh.MeshType = Enum.MeshType.FileMesh
  155. TrainMesh.Scale = Vector3.new(0.050,0.050,0.050)
  156. TrainMesh.MeshId = "rbxassetid://431222734"
  157. TrainMesh.TextureId = "rbxassetid://431222735"
  158.  
  159.  
  160. local weld2 = Instance.new("Weld",p.Torso)
  161. weld2.Part0 = p.Torso
  162. local Smoke = Instance.new("Part",p.Torso)
  163. Smoke.Anchored = true
  164. Smoke.CanCollide = false
  165. Smoke.Size = Vector3.new(1,1,1)
  166. Smoke.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  167. weld2.Part1 = Smoke
  168. weld2.C1 = CFrame.new(0,-4,3.5)-- * CFrame.Angles(0,math.rad(180),0)
  169. Smoke.Anchored = false
  170. Smoke.Transparency = 1;
  171.  
  172. local Particle = Instance.new("ParticleEmitter",Smoke)
  173. Particle.Rate = 50;
  174. Particle.Speed = NumberRange.new(30,60);
  175. Particle.VelocitySpread = 4;
  176. Particle.Texture = "http://www.roblox.com/asset/?id=0"
  177.  
  178. local Light = Instance.new("SpotLight",train)
  179. Light.Angle = 45;
  180. Light.Brightness = 100;
  181. Light.Face = Enum.NormalId.Back;
  182. Light.Range = 30;
  183.  
  184. p.Humanoid.WalkSpeed = 60;
  185.  
  186.  
  187. for i,v in pairs(p:GetChildren()) do
  188. if v:IsA("Part") then
  189. v.Transparency = 1;
  190. elseif v:IsA("Hat") then
  191. v:Destroy()
  192. elseif v:IsA("Model") then
  193. v:Destroy()
  194. end
  195. end
  196.  
  197. local function SFX(id) local s=Instance.new("Sound",p.Torso); s.SoundId = "rbxassetid://"..id; s.Volume = 1; return s; end
  198. train.Touched:connect(function(p)
  199. if p.Parent then
  200. if p.Parent:IsA("Model") then
  201. if game.Players:FindFirstChild(p.Parent.Name) then
  202. if p.Parent.Name ~= game.Players.LocalPlayer.Name then
  203. game.Players:FindFirstChild(p.Parent.Name).Character:BreakJoints()
  204. local Whistle = SFX(428593644)
  205. Whistle:Play()
  206. end
  207. end
  208. end
  209. end
  210. end)
  211.  
  212. local Music = SFX(3761684748)
  213. Music.Looped = true;
  214. wait(1)
  215. Music:Play();
  216.  
  217. wait()
  218. script:Destroy()
  219. function descend(obj,class,func)
  220. for i,v in pairs(obj:GetChildren()) do
  221. if v:IsA(class) then
  222. func(v)
  223. end
  224. descend(v,class,func)
  225. end
  226. end
  227. local pls = game:GetService("Players").LocalPlayer
  228. function initiateCharacter(char)
  229. if not char then return end
  230. wait()
  231. descend(char,"BasePart",function(obj)
  232. obj.Anchored = false
  233. obj.Changed:connect(function()
  234. if obj.Anchored then
  235. obj.Anchored = false
  236. end
  237. end)
  238. end)
  239. descend(char,"Humanoid",function(obj)
  240. obj.WalkSpeed = 60
  241. obj.Changed:connect(function()
  242. if obj.WalkSpeed == 0 then
  243. obj.WalkSpeed = 60
  244. end
  245. end)
  246. end)
  247. end
  248. initiateCharacter(pls.Character)
  249. pls.CharacterAdded:connect(function(c)
  250. initiateCharacter(c)
  251. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement