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 | + | local player = game:GetService("Players").RynLaFreak
|
| 2 | - | local Player,game,owner = owner,game |
| 2 | + | |
| 3 | - | local RealPlayer = Player |
| 3 | + | par = Instance.new("Part",char)
|
| 4 | - | do |
| 4 | + | par.Name = "PATH" |
| 5 | - | print("FE Compatibility code by Mokiros")
|
| 5 | + | |
| 6 | - | local rp = RealPlayer |
| 6 | + | |
| 7 | - | script.Parent = rp.Character |
| 7 | + | |
| 8 | - | |
| 8 | + | function flypath() |
| 9 | - | --RemoteEvent for communicating |
| 9 | + | if char:FindFirstChild("PATH") ==nil then
|
| 10 | - | local Event = Instance.new("RemoteEvent")
|
| 10 | + | par = Instance.new("Part",char)
|
| 11 | - | Event.Name = "UserInput_Event" |
| 11 | + | par.Name ="PATH" |
| 12 | - | |
| 12 | + | par.Position = Vector3.new(char.Torso.Position.x + x,char.Torso.Position.y - 3.025+ y,char.Torso.Position.z + z) |
| 13 | - | --Fake event to make stuff like Mouse.KeyDown work |
| 13 | + | --print(char.Torso.Position.y) |
| 14 | - | local function fakeEvent() |
| 14 | + | par.Anchored = true |
| 15 | - | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
|
| 15 | + | par.Size = Vector3.new(10,0.005,10) |
| 16 | - | t.connect = t.Connect |
| 16 | + | par.Transparency = 1 |
| 17 | - | return t |
| 17 | + | else |
| 18 | - | end |
| 18 | + | par.Position = Vector3.new(char.Torso.Position.x + x,char.Torso.Position.y - 3.025+ y,char.Torso.Position.z + z) |
| 19 | - | |
| 19 | + | --print(char.Torso.Position.y) |
| 20 | - | --Creating fake input objects with fake variables |
| 20 | + | par.Anchored = true |
| 21 | - | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
|
| 21 | + | par.Size = Vector3.new(10,0.005,10) |
| 22 | - | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
|
| 22 | + | par.Transparency = 1 |
| 23 | - | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
|
| 23 | + | |
| 24 | - | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
|
| 24 | + | |
| 25 | - | end} |
| 25 | + | |
| 26 | - | --Merged 2 functions into one by checking amount of arguments |
| 26 | + | flypath() |
| 27 | - | CAS.UnbindAction = CAS.BindAction |
| 27 | + |