PasterXIV

Untitled

Oct 10th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},Soundscape=r:GetService("RunService").Heartbeat,BindToSoundscape=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6.  
  7. player = game:service("Players").LocalPlayer
  8. char = player.Character
  9. fdown = false
  10. rdown = false
  11. qdown = false
  12. suit = Instance.new("Model", char)
  13. suit.Name = "Suit"
  14. --[[
  15. for i,v in pairs(char:GetChildren()) do
  16. if v.Name ~= "Head" and v.className == "Part" then
  17. local bp = Instance.new("Part", suit)
  18. bp.Name = v.Name
  19. bp.TopSurface = "Smooth"
  20. bp.BottomSurface = "Smooth"
  21. bp.CanCollide = false
  22. bp.FormFactor = "Custom"
  23. bp.Size = v.Size
  24. bp.Material = "Grass"
  25. local bw = Instance.new("Motor6D", bp)
  26. bw.Part1 = bp
  27. bw.Part0 = v
  28. end
  29. end
  30. ]]
  31. hb = Instance.new("HopperBin", player.Backpack)
  32. hb.Name = "Magic"
  33. function fkey()
  34. local ps = Instance.new("Part", workspace)
  35. ps.Name = "MagicPart"
  36. ps.TopSurface = "Smooth"
  37. ps.BottomSurface = "Smooth"
  38. ps.BrickColor = BrickColor.new("Dark green")
  39. ps.Material = "Grass"
  40. ps.FormFactor = "Custom"
  41. ps.Size = Vector3.new(6, 0.2, 6)
  42. ps.Anchored = true
  43. ps.CFrame = char.Torso.CFrame*CFrame.new(0, -3, 0)
  44. local i = 0
  45. while fdown == true do
  46. wait(0.03)
  47. i = i + 1
  48. ps.CFrame = ps.CFrame*CFrame.new(0, 0.1, 0)
  49. local ts = ps.CFrame
  50. ps.Size = Vector3.new(6, i*0.2, 6)
  51. ps.CFrame = ts
  52. end
  53. coroutine.resume(coroutine.create(function()
  54. wait(40)
  55. ps:remove()
  56. end))
  57. end
  58. function rkey()
  59. local ps = Instance.new("Part", workspace)
  60. ps.Name = "MagicPart"
  61. ps.TopSurface = "Smooth"
  62. ps.BottomSurface = "Smooth"
  63. ps.BrickColor = BrickColor.new("Dark green")
  64. ps.Material = "Grass"
  65. ps.FormFactor = "Custom"
  66. ps.Size = Vector3.new(6, 0.2, 6)
  67. ps.Anchored = true
  68. ps.CFrame = char.Torso.CFrame*CFrame.new(0, -6, -6)*CFrame.Angles(-10, 0, 0)
  69. local i = 0
  70. while rdown == true do
  71. wait(0.03)
  72. i = i + 1
  73. ps.CFrame = ps.CFrame*CFrame.new(0, -0.1, 0)
  74. local ts = ps.CFrame
  75. ps.Size = Vector3.new(6, i*0.2, 6)
  76. ps.CFrame = ts
  77. end
  78. coroutine.resume(coroutine.create(function()
  79. wait(40)
  80. ps:remove()
  81. end))
  82. end
  83. function tkey()
  84. local ps = Instance.new("Part", workspace)
  85. ps.Name = "MagicPart"
  86. ps.TopSurface = "Smooth"
  87. ps.BottomSurface = "Smooth"
  88. ps.BrickColor = BrickColor.new("Dark green")
  89. ps.Material = "Grass"
  90. ps.FormFactor = "Custom"
  91. ps.Size = Vector3.new(40, 30, 6)
  92. ps.Anchored = true
  93. ps.CFrame = char.Torso.CFrame*CFrame.new(0, 8, -15)*CFrame.Angles(-10, 0, 0)
  94. coroutine.resume(coroutine.create(function()
  95. wait(40)
  96. ps:remove()
  97. end))
  98. for i = 1, 300 do
  99. wait()
  100. ps.CFrame = ps.CFrame*CFrame.new(0, -0.4, 0.7)
  101. end
  102. end
  103. function ykey()
  104. local ps = Instance.new("Part", workspace)
  105. ps.Name = "MagicPart"
  106. ps.TopSurface = "Smooth"
  107. ps.BottomSurface = "Smooth"
  108. ps.BrickColor = BrickColor.new("Dark green")
  109. ps.Material = "Grass"
  110. ps.FormFactor = "Custom"
  111. ps.Size = Vector3.new(40, 30, 6)
  112. ps.Anchored = true
  113. ps.CFrame = char.Torso.CFrame*CFrame.new(0, 8, -15)*CFrame.Angles(-10, 0, 0)
  114. coroutine.resume(coroutine.create(function()
  115. wait(40)
  116. ps:remove()
  117. end))
  118. end
  119. function ukey()
  120. for i = 1, 40 do
  121. local ps = Instance.new("Part", workspace)
  122. ps.Name = "MagicPart"
  123. ps.TopSurface = "Smooth"
  124. ps.BottomSurface = "Smooth"
  125. ps.BrickColor = BrickColor.new("Dark green")
  126. ps.Material = "Grass"
  127. ps.FormFactor = "Custom"
  128. ps.Size = Vector3.new(40, 30, 6)
  129. ps.Anchored = true
  130. ps.CFrame = char.Torso.CFrame*CFrame.Angles(0, i*5, 0)
  131. ps.CFrame = ps.CFrame*CFrame.Angles(-10, 0, 0)
  132. coroutine.resume(coroutine.create(function()
  133. wait(40)
  134. ps:remove()
  135. end))
  136. coroutine.resume(coroutine.create(function()
  137. for i = 1, 300 do
  138. wait()
  139. ps.CFrame = ps.CFrame*CFrame.new(0, -0.4, 0.7)
  140. end
  141. end))
  142. end
  143. end
  144. function qkey()
  145. while qdown == true do
  146. wait(0.03)
  147. local ps = Instance.new("Part", workspace)
  148. ps.Name = "MagicPart"
  149. ps.TopSurface = "Smooth"
  150. ps.BottomSurface = "Smooth"
  151. ps.BrickColor = BrickColor.new("Dark green")
  152. ps.Material = "Grass"
  153. ps.FormFactor = "Custom"
  154. ps.Size = Vector3.new(6, 0.2, 6)
  155. ps.Anchored = true
  156. ps.CFrame = char.Torso.CFrame*CFrame.new(0, -3, 0)
  157. end
  158. coroutine.resume(coroutine.create(function()
  159. wait(40)
  160. ps:remove()
  161. end))
  162. end
  163. hb.Selected:connect(function(mouse)
  164. mouse.KeyUp:connect(function(key)
  165. if key == "f" then
  166. fdown = false
  167. elseif key == "r" then
  168. rdown = false
  169. end
  170. end)
  171. mouse.KeyDown:connect(function(key)
  172. if key == "f" then
  173. fdown = true
  174. fkey()
  175. elseif key == "r" then
  176. rdown = true
  177. rkey()
  178. elseif key == "t" then
  179. tkey()
  180. elseif key == "u" then
  181. ukey()
  182. elseif key == "y" then
  183. ykey()
  184. elseif key == "q" then
  185. if qdown == false then
  186. qdown = true
  187. qkey()
  188. else
  189. qdown = false
  190. end
  191. end
  192. end)
  193. end)
Advertisement
Add Comment
Please, Sign In to add comment