Advertisement
Ban43_GodOfEdits

earthj

Jan 12th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.18 KB | None | 0 0
  1. --[[
  2. ______ __ __ ____ __ ______
  3. / _/ _/ / \/ \ / __/___ __ _______/ /_ / / /
  4. / // / / /\/ /\ \ __/ /_/ __ \/ / / / ___/ __ \ / // /
  5. / // / / / /_/ \ \/_ __/ /_/ / /_/ / / / /_/ / / // /
  6. / // / /_/ \_\/_/ \____/\__,_/_/ /_.___/ _/ // /
  7. /__/__/ /__/__/
  8.  
  9. --]]
  10. --https://github.com/Mokiros/roblox-FE-compatibility
  11. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  12. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  13. local RealPlayer = Player
  14. 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={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=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
  15.  
  16. player = game:service("Players").LocalPlayer
  17. char = player.Character
  18. fdown = false
  19. rdown = false
  20. qdown = false
  21. suit = Instance.new("Model", char)
  22. suit.Name = "Suit"
  23. --[[
  24. for i,v in pairs(char:GetChildren()) do
  25. if v.Name ~= "Head" and v.className == "Part" then
  26. local bp = Instance.new("Part", suit)
  27. bp.Name = v.Name
  28. bp.TopSurface = "Smooth"
  29. bp.BottomSurface = "Smooth"
  30. bp.CanCollide = false
  31. bp.FormFactor = "Custom"
  32. bp.Size = v.Size
  33. bp.Material = "Grass"
  34. local bw = Instance.new("Motor6D", bp)
  35. bw.Part1 = bp
  36. bw.Part0 = v
  37. end
  38. end
  39. ]]
  40. hb = Instance.new("HopperBin", player.Backpack)
  41. hb.Name = "Magic"
  42. function fkey()
  43. local ps = Instance.new("Part", workspace)
  44. ps.Name = "MagicPart"
  45. ps.TopSurface = "Smooth"
  46. ps.BottomSurface = "Smooth"
  47. ps.BrickColor = BrickColor.new("Dark green")
  48. ps.Material = "Grass"
  49. ps.FormFactor = "Custom"
  50. ps.Size = Vector3.new(6, 0.2, 6)
  51. ps.Anchored = true
  52. ps.CFrame = char.Torso.CFrame*CFrame.new(0, -3, 0)
  53. local i = 0
  54. while fdown == true do
  55. wait(0.03)
  56. i = i + 1
  57. ps.CFrame = ps.CFrame*CFrame.new(0, 0.1, 0)
  58. local ts = ps.CFrame
  59. ps.Size = Vector3.new(6, i*0.2, 6)
  60. ps.CFrame = ts
  61. end
  62. coroutine.resume(coroutine.create(function()
  63. wait(40)
  64. ps:remove()
  65. end))
  66. end
  67. function rkey()
  68. local ps = Instance.new("Part", workspace)
  69. ps.Name = "MagicPart"
  70. ps.TopSurface = "Smooth"
  71. ps.BottomSurface = "Smooth"
  72. ps.BrickColor = BrickColor.new("Dark green")
  73. ps.Material = "Grass"
  74. ps.FormFactor = "Custom"
  75. ps.Size = Vector3.new(6, 0.2, 6)
  76. ps.Anchored = true
  77. ps.CFrame = char.Torso.CFrame*CFrame.new(0, -6, -6)*CFrame.Angles(-10, 0, 0)
  78. local i = 0
  79. while rdown == true do
  80. wait(0.03)
  81. i = i + 1
  82. ps.CFrame = ps.CFrame*CFrame.new(0, -0.1, 0)
  83. local ts = ps.CFrame
  84. ps.Size = Vector3.new(6, i*0.2, 6)
  85. ps.CFrame = ts
  86. end
  87. coroutine.resume(coroutine.create(function()
  88. wait(40)
  89. ps:remove()
  90. end))
  91. end
  92. function tkey()
  93. local ps = Instance.new("Part", workspace)
  94. ps.Name = "MagicPart"
  95. ps.TopSurface = "Smooth"
  96. ps.BottomSurface = "Smooth"
  97. ps.BrickColor = BrickColor.new("Dark green")
  98. ps.Material = "Grass"
  99. ps.FormFactor = "Custom"
  100. ps.Size = Vector3.new(40, 30, 6)
  101. ps.Anchored = true
  102. ps.CFrame = char.Torso.CFrame*CFrame.new(0, 8, -15)*CFrame.Angles(-10, 0, 0)
  103. coroutine.resume(coroutine.create(function()
  104. wait(40)
  105. ps:remove()
  106. end))
  107. for i = 1, 300 do
  108. wait()
  109. ps.CFrame = ps.CFrame*CFrame.new(0, -0.4, 0.7)
  110. end
  111. end
  112. function ykey()
  113. local ps = Instance.new("Part", workspace)
  114. ps.Name = "MagicPart"
  115. ps.TopSurface = "Smooth"
  116. ps.BottomSurface = "Smooth"
  117. ps.BrickColor = BrickColor.new("Dark green")
  118. ps.Material = "Grass"
  119. ps.FormFactor = "Custom"
  120. ps.Size = Vector3.new(40, 30, 6)
  121. ps.Anchored = true
  122. ps.CFrame = char.Torso.CFrame*CFrame.new(0, 8, -15)*CFrame.Angles(-10, 0, 0)
  123. coroutine.resume(coroutine.create(function()
  124. wait(40)
  125. ps:remove()
  126. end))
  127. end
  128. function ukey()
  129. for i = 1, 40 do
  130. local ps = Instance.new("Part", workspace)
  131. ps.Name = "MagicPart"
  132. ps.TopSurface = "Smooth"
  133. ps.BottomSurface = "Smooth"
  134. ps.BrickColor = BrickColor.new("Dark green")
  135. ps.Material = "Grass"
  136. ps.FormFactor = "Custom"
  137. ps.Size = Vector3.new(40, 30, 6)
  138. ps.Anchored = true
  139. ps.CFrame = char.Torso.CFrame*CFrame.Angles(0, i*5, 0)
  140. ps.CFrame = ps.CFrame*CFrame.Angles(-10, 0, 0)
  141. coroutine.resume(coroutine.create(function()
  142. wait(40)
  143. ps:remove()
  144. end))
  145. coroutine.resume(coroutine.create(function()
  146. for i = 1, 300 do
  147. wait()
  148. ps.CFrame = ps.CFrame*CFrame.new(0, -0.4, 0.7)
  149. end
  150. end))
  151. end
  152. end
  153. function qkey()
  154. while qdown == true do
  155. wait(0.03)
  156. local ps = Instance.new("Part", workspace)
  157. ps.Name = "MagicPart"
  158. ps.TopSurface = "Smooth"
  159. ps.BottomSurface = "Smooth"
  160. ps.BrickColor = BrickColor.new("Dark green")
  161. ps.Material = "Grass"
  162. ps.FormFactor = "Custom"
  163. ps.Size = Vector3.new(6, 0.2, 6)
  164. ps.Anchored = true
  165. ps.CFrame = char.Torso.CFrame*CFrame.new(0, -3, 0)
  166. end
  167. coroutine.resume(coroutine.create(function()
  168. wait(40)
  169. ps:remove()
  170. end))
  171. end
  172. hb.Selected:connect(function(mouse)
  173. mouse.KeyUp:connect(function(key)
  174. if key == "f" then
  175. fdown = false
  176. elseif key == "r" then
  177. rdown = false
  178. end
  179. end)
  180. mouse.KeyDown:connect(function(key)
  181. if key == "f" then
  182. fdown = true
  183. fkey()
  184. elseif key == "r" then
  185. rdown = true
  186. rkey()
  187. elseif key == "t" then
  188. tkey()
  189. elseif key == "u" then
  190. ukey()
  191. elseif key == "y" then
  192. ykey()
  193. elseif key == "q" then
  194. if qdown == false then
  195. qdown = true
  196. qkey()
  197. else
  198. qdown = false
  199. end
  200. end
  201. end)
  202. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement