SHARE
TWEET

IT ISNT MADE BY ME

a guest Jun 20th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. -- This script has been converted to FE by iPxter
  3.  
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. do
  8.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  9.     script.Parent = Player.Character
  10.  
  11.     --RemoteEvent for communicating
  12.     local Event = Instance.new("RemoteEvent")
  13.     Event.Name = "UserInput_Event"
  14.  
  15.     --Fake event to make stuff like Mouse.KeyDown work
  16.     local function fakeEvent()
  17.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  18.         t.connect = t.Connect
  19.         return t
  20.     end
  21.  
  22.     --Creating fake input objects with fake variables
  23.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  24.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27.     end}
  28.     --Merged 2 functions into one by checking amount of arguments
  29.     CAS.UnbindAction = CAS.BindAction
  30.  
  31.     --This function will trigger the events that have been :Connect()'ed
  32.     local function te(self,ev,...)
  33.         local t = m[ev]
  34.         if t and t._fakeEvent and t.Function then
  35.             t.Function(...)
  36.         end
  37.     end
  38.     m.TrigEvent = te
  39.     UIS.TrigEvent = te
  40.  
  41.     Event.OnServerEvent:Connect(function(plr,io)
  42.         if plr~=Player then return end
  43.         if io.isMouse then
  44.             m.Target = io.Target
  45.             m.Hit = io.Hit
  46.         else
  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.             for _,t in pairs(CAS.Actions) do
  52.                 for _,k in pairs(t.Keys) do
  53.                     if k==io.KeyCode then
  54.                         t.Function(t.Name,io.UserInputState,io)
  55.                     end
  56.                 end
  57.             end
  58.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60.         end
  61.     end)
  62.     Event.Parent = NLS([==[
  63.     local Player = game:GetService("Players").LocalPlayer
  64.     local Event = script:WaitForChild("UserInput_Event")
  65.  
  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})
  71.     end
  72.     UIS.InputBegan:Connect(input)
  73.     UIS.InputEnded:Connect(input)
  74.  
  75.     local Mouse = Player:GetMouse()
  76.     local h,t
  77.     --Give the server mouse data 30 times every second, but only if the values changed
  78.     --If player is not moving their mouse, client won't fire events
  79.     while wait(1/30) do
  80.         if h~=Mouse.Hit or t~=Mouse.Target then
  81.             h,t=Mouse.Hit,Mouse.Target
  82.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  83.         end
  84.     end]==],Player.Character)
  85.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  86. end
  87. --[[
  88.     FilteringEnabled Script Bar
  89.    
  90.     Run non-fe compatable scripts under Mokorios's compability code.
  91.     It should be compatible with most scripts, but if you encounter issues make sure to let Mokorios know.
  92.    
  93.     The FE Compatibility code can be found at:
  94.     https://github.com/Mokiros/roblox-FE-compatibility.
  95. --]]
  96.     if not script:IsA("LocalScript") then
  97.         error(">> This script is being run as a server-sided script (or modulescript?) instead of a localscript.\nYou'll need to run it as a localscript, with hl/(url).<<")
  98.     end
  99.    
  100.     if not NS then
  101.         NS = function() end
  102.     end
  103.    
  104.     services = setmetatable({}, {  
  105.     __index = function(self, k, ...)
  106.         return game:GetService(k)
  107.     end})
  108.    
  109.     local plr = owner
  110.     print("Credit to Mokiros for his FE Compatibility script.\nThis project wouldn't be possible without him.\n")
  111.     print("You can obtain a copy of his code for his FE compatability at https://github.com/Mokiros/roblox-FE-compatibility.\n")
  112.     print("You may also obtain a copy of his licence at https://raw.githubusercontent.com/Mokiros/roblox-FE-compatibility/master/LICENSE.\n")
  113.     print("All of the source code in exception to his compatability code is in the public domain, and was made by TheFlamingBlaster.")
  114.    
  115.     local fecompat = [[
  116.     if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  117.     local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  118.     local RealPlayer = Player
  119.     do 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 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={},Stepped=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]]
  120.    
  121.     NS([[
  122.         wait(1)
  123.         local requestHandlers = {
  124.             ["HttpGet"] = function(client, url, cache)
  125.                 return game:GetService"HttpService":GetAsync(url, cache or true)
  126.             end,
  127.             ["GetDataStore"] = function(client, ds, key)
  128.                 local ds = game:GetService"DataStoreService":GetDataStore(ds):GetAsync(key)
  129.             end,
  130.             ["SetDataStore"] = function(client, ds, key, newval)
  131.                 local ds = game:GetService"DataStoreService":GetDataStore(ds):SetAsync(key, newval)
  132.             end
  133.         }
  134.        
  135.        
  136.         local generateRemote
  137.         generateRemote = function()
  138.             local remote = Instance.new("RemoteFunction")
  139.             remote.Name = getfenv().owner.Name.." : Coms"
  140.            
  141.             remote.OnServerInvoke = function(client, request, ...)
  142.                 if requestHandlers[request] then
  143.                     return requestHandlers[request](client, ...)
  144.                 end
  145.             end
  146.            
  147.             remote.Parent = workspace
  148.            
  149.             remote.AncestryChanged:Connect(function()
  150.                 delay(0.03, function()
  151.                     if remote then
  152.                         remote:Destroy()
  153.                     end
  154.                 end)
  155.                 generateRemote()
  156.             end)
  157.         end
  158.        
  159.        
  160.         generateRemote()
  161.     ]], workspace)
  162.    
  163.     local remote = workspace:FindFirstChild(plr.Name..": Coms") or workspace:WaitForChild(plr.Name.." : Coms")
  164.    
  165.     -- Objects
  166.    
  167.     local FEBar = Instance.new("ScreenGui")
  168.     local BG = Instance.new("Frame")
  169.     local TextLabel = Instance.new("TextLabel")
  170.     local Exit = Instance.new("TextButton")
  171.     local UrlBar = Instance.new("TextBox")
  172.     local TextLabel_2 = Instance.new("TextLabel")
  173.  
  174.     -- Properties
  175.    
  176.     FEBar.Name = "FEBar"
  177.    
  178.     BG.Name = "BG"
  179.     BG.Parent = FEBar
  180.     BG.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  181.     BG.BorderSizePixel = 0
  182.     BG.Position = UDim2.new(0.720785916, 0, 0.897717714, 0)
  183.     BG.Size = UDim2.new(0.279214054, 0, 0.10228233, 0)
  184.    
  185.     TextLabel.Parent = BG
  186.     TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  187.     TextLabel.BackgroundTransparency = 1
  188.     TextLabel.Size = UDim2.new(0.683333337, 0, 0.201834857, 0)
  189.     TextLabel.Font = Enum.Font.SourceSansSemibold
  190.     TextLabel.FontSize = Enum.FontSize.Size14
  191.     TextLabel.Text = "FE Command Bar"
  192.     TextLabel.TextColor3 = Color3.new(1, 1, 1)
  193.     TextLabel.TextScaled = true
  194.     TextLabel.TextWrapped = true
  195.     TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  196.    
  197.     Exit.Name = "Exit"
  198.     Exit.Parent = BG
  199.     Exit.BackgroundColor3 = Color3.new(1, 1, 1)
  200.     Exit.BackgroundTransparency = 1
  201.     Exit.Position = UDim2.new(0.899999976, 0, 0, 0)
  202.     Exit.Size = UDim2.new(0.100000001, 0, 0.206422016, 0)
  203.     Exit.Font = Enum.Font.SourceSans
  204.     Exit.FontSize = Enum.FontSize.Size14
  205.     Exit.Text = "X"
  206.     Exit.TextColor3 = Color3.new(1, 0, 0)
  207.     Exit.TextScaled = true
  208.     Exit.TextWrapped = true
  209.    
  210.     UrlBar.Name = "UrlBar"
  211.     UrlBar.Parent = BG
  212.     UrlBar.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  213.     UrlBar.BorderSizePixel = 0
  214.     UrlBar.Position = UDim2.new(0, 0, 0.247933879, 0)
  215.     UrlBar.Size = UDim2.new(1, 0, 0.504132211, 0)
  216.     UrlBar.Font = Enum.Font.SourceSans
  217.     UrlBar.FontSize = Enum.FontSize.Size14
  218.     UrlBar.Text = ""
  219.     UrlBar.TextColor3 = Color3.new(0, 0, 0)
  220.     UrlBar.TextScaled = true
  221.     UrlBar.TextWrapped = true
  222.     UrlBar.TextXAlignment = Enum.TextXAlignment.Left
  223.    
  224.     TextLabel_2.Parent = BG
  225.     TextLabel_2.BackgroundColor3 = Color3.new(1, 0, 0)
  226.     TextLabel_2.BackgroundTransparency = 1
  227.     TextLabel_2.Position = UDim2.new(0, 0, 0.834710777, 0)
  228.     TextLabel_2.Size = UDim2.new(1, 0, 0.165289253, 0)
  229.     TextLabel_2.Font = Enum.Font.SourceSansSemibold
  230.     TextLabel_2.FontSize = Enum.FontSize.Size14
  231.     TextLabel_2.Text = "Click the  black box above, paste in your link and press \"Enter\" to run your script."
  232.     TextLabel_2.TextColor3 = Color3.new(1, 0, 0)
  233.     TextLabel_2.TextScaled = true
  234.     TextLabel_2.TextWrapped = true
  235.     TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
  236.    
  237.     Exit.MouseButton1Click:Connect(function()
  238.         FEBar:Destroy()
  239.         script.Disabled = true
  240.     end)
  241.    
  242.     local curtext = ""
  243.    
  244.     UrlBar.Changed:Connect(function()
  245.         if not UrlBar.Text:match("#") then
  246.             curtext = UrlBar.Text
  247.         end
  248.     end)
  249.    
  250.     UrlBar.FocusLost:Connect(function(e)
  251.         if e == true then
  252.             if curtext:sub(1, 3) == "hl/" then
  253.                 UrlBar.Text = curtext:sub(3)
  254.             end
  255.             if curtext:sub(1, 2) == "h/" then
  256.                 UrlBar.Text = curtext:sub(2)
  257.             end
  258.             NS(fecompat.." "..remote:InvokeServer("HttpGet", curtext), workspace)
  259.             print("Running "..curtext)
  260.         end
  261.     end)
  262.    
  263.     FEBar.Parent = plr:FindFirstChildOfClass"PlayerGui"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top