Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local rem = Instance.new("RemoteEvent", game.ReplicatedStorage)
- -- Farewell Infortality.
- -- Version: 2.82
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local Executor = Instance.new("Frame")
- local Frame = Instance.new("Frame")
- local TextBox = Instance.new("TextBox")
- local exe = Instance.new("TextButton")
- local cle = Instance.new("TextButton")
- local pri = Instance.new("TextLabel")
- local TextLabel = Instance.new("TextLabel")
- local bar = Instance.new("Frame")
- --Properties:
- ScreenGui.Parent = owner:WaitForChild("PlayerGui")
- Executor.Name = "Executor"
- Executor.Parent = ScreenGui
- Executor.Active = true
- Executor.BackgroundColor3 = Color3.new(0.313726, 0.313726, 0.313726)
- Executor.BorderSizePixel = 0
- Executor.Position = UDim2.new(0.554826558, 0, 0.299810231, 0)
- Executor.Selectable = true
- Executor.Size = UDim2.new(0, 419, 0, 277)
- Frame.Parent = Executor
- Frame.BackgroundColor3 = Color3.new(0.415686, 0.415686, 0.415686)
- Frame.BorderSizePixel = 0
- Frame.Size = UDim2.new(0, 419, 0, 21)
- TextBox.Parent = Frame
- TextBox.BackgroundColor3 = Color3.new(0.227451, 0.227451, 0.227451)
- TextBox.BorderSizePixel = 0
- TextBox.Position = UDim2.new(0.0190930795, 0, 2.9523809, 0)
- TextBox.Size = UDim2.new(0, 402, 0, 207)
- TextBox.ZIndex = 3
- TextBox.Font = Enum.Font.GothamSemibold
- TextBox.MultiLine = true
- TextBox.Text = ""
- TextBox.TextColor3 = Color3.new(0.792157, 0.792157, 0.792157)
- TextBox.TextSize = 14
- TextBox.TextXAlignment = Enum.TextXAlignment.Left
- TextBox.TextYAlignment = Enum.TextYAlignment.Top
- exe.Name = "exe"
- exe.Parent = Frame
- exe.BackgroundColor3 = Color3.new(0.313726, 0.313726, 0.313726)
- exe.BorderColor3 = Color3.new(0.792157, 0.792157, 0.792157)
- exe.Position = UDim2.new(0.035799522, 0, 1.33333337, 0)
- exe.Size = UDim2.new(0, 95, 0, 27)
- exe.Font = Enum.Font.GothamSemibold
- exe.Text = "Execute"
- exe.TextColor3 = Color3.new(0.792157, 0.792157, 0.792157)
- exe.TextSize = 14
- cle.Name = "cle"
- cle.Parent = Frame
- cle.BackgroundColor3 = Color3.new(0.313726, 0.313726, 0.313726)
- cle.BorderColor3 = Color3.new(0.792157, 0.792157, 0.792157)
- cle.Position = UDim2.new(0.307875901, 0, 1.33333337, 0)
- cle.Size = UDim2.new(0, 62, 0, 27)
- cle.Font = Enum.Font.GothamSemibold
- cle.Text = "Clear"
- cle.TextColor3 = Color3.new(0.792157, 0.792157, 0.792157)
- cle.TextSize = 14
- pri.Name = "pri"
- pri.Parent = Frame
- pri.BackgroundColor3 = Color3.new(1, 1, 1)
- pri.BackgroundTransparency = 1
- pri.Size = UDim2.new(0, 36, 0, 21)
- pri.Font = Enum.Font.GothamBold
- pri.Text = "Pri"
- pri.TextColor3 = Color3.new(1, 1, 1)
- pri.TextSize = 20
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Position = UDim2.new(0.0692124069, 0, -0.428571433, 0)
- TextLabel.Size = UDim2.new(0, 35, 0, 39)
- TextLabel.Font = Enum.Font.GothamBold
- TextLabel.Text = "sm"
- TextLabel.TextColor3 = Color3.new(0.627451, 1, 0.988235)
- TextLabel.TextSize = 20
- TextLabel.TextXAlignment = Enum.TextXAlignment.Left
- bar.Name = "bar"
- bar.Parent = Frame
- bar.BackgroundColor3 = Color3.new(0.556863, 0.890196, 0.878431)
- bar.BorderSizePixel = 0
- bar.Position = UDim2.new(-0.00238663494, 0, 0.958913147, 0)
- bar.Size = UDim2.new(0, 420, 0, 2)
- -- Scripts:
- cle.MouseButton1Click:connect(function()
- TextBox.Text = ""
- end)
- local a = Instance.new('LocalScript')
- a.Parent = exe
- event = game.ReplicatedStorage.RemoteEvent
- a.Parent.MouseButton1Click:Connect(function()
- event:FireServer(TextBox.Text)
- end)
- Executor.Draggable = true
- Executor.Active = true
- Executor.Selectable = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement