SHOW:
|
|
- or go back to the newest paste.
| 1 | - | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
|
| 1 | + | |
| 2 | - | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
| 2 | + | print'Credits to boss_kiddos... Edited by SonicSydney!' |
| 3 | - | do |
| 3 | + | |
| 4 | - | print("FE Compatibility code by Mokiros")
|
| 4 | + | |
| 5 | - | script.Parent = Player.Character |
| 5 | + | |
| 6 | local rs=game:service'RunService'.RenderStepped | |
| 7 | - | --RemoteEvent for communicating |
| 7 | + | |
| 8 | - | local Event = Instance.new("RemoteEvent")
|
| 8 | + | |
| 9 | - | Event.Name = "UserInput_Event" |
| 9 | + | |
| 10 | if Character:FindFirstChild("cht")then Character.cht:Destroy()end
| |
| 11 | - | --Fake event to make stuff like Mouse.KeyDown work |
| 11 | + | |
| 12 | - | local function fakeEvent() |
| 12 | + | |
| 13 | - | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
|
| 13 | + | |
| 14 | - | t.connect = t.Connect |
| 14 | + | |
| 15 | - | return t |
| 15 | + | |
| 16 | texts[i].Size=UDim2.new(1/snum,0,1,0)texts[i].Name=text:sub(i,i)--texts[i].TextSize=30 | |
| 17 | texts[i].Text=text:sub(i,i)texts[i].Position=UDim2.new((i-1)/snum,0,.3,0)texts[i].BackgroundTransparency=1 texts[i].TextColor3=Color3.new(255,0,0) | |
| 18 | - | --Creating fake input objects with fake variables |
| 18 | + | |
| 19 | - | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
|
| 19 | + | |
| 20 | - | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
|
| 20 | + | |
| 21 | - | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
|
| 21 | + | |
| 22 | - | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
|
| 22 | + | |
| 23 | - | end} |
| 23 | + | |
| 24 | - | --Merged 2 functions into one by checking amount of arguments |
| 24 | + | |
| 25 | - | CAS.UnbindAction = CAS.BindAction |
| 25 | + | |
| 26 | end | |
| 27 | - | --This function will trigger the events that have been :Connect()'ed |
| 27 | + | |
| 28 | - | local function te(self,ev,...) |
| 28 | + | |
| 29 | - | local t = m[ev] |
| 29 | + | |
| 30 | - | if t and t._fakeEvent and t.Function then |
| 30 | + | |
| 31 | - | t.Function(...) |
| 31 | + | s.Volume=1 s.SoundId="rbxassetid://462606062"s:Play()s.Ended:connect(function()s:Destroy()b:Destroy()end) |
| 32 | game:service'Debris':AddItem(b,5) | |
| 33 | end) | |
| 34 | - | m.TrigEvent = te |
| 34 | + | |
| 35 | - | UIS.TrigEvent = te |
| 35 | + | |
| 36 | end) |