SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
4 | local RealPlayer = Player | |
5 | 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 | |
6 | plr = game.Players.LocalPlayer | |
7 | repeat wait() until plr.Character | |
8 | char = plr.Character | |
9 | ||
10 | local fileselect = Instance.new("Sound",char) | |
11 | fileselect.SoundId = "rbxassetid://188988010" | |
12 | fileselect.Volume = 4 | |
13 | fileselect.Looped = true | |
14 | fileselect:Play() | |
15 | local yAhOo = Instance.new("Sound",char) | |
16 | yAhOo.SoundId = "rbxassetid://1555685807" | |
17 | yAhOo.Volume = 10 | |
18 | ||
19 | PlrGui = plr.PlayerGui | |
20 | NewInstance = function(instance,parent,properties) | |
21 | local inst = Instance.new(instance) | |
22 | inst.Parent = parent | |
23 | if(properties)then | |
24 | for i,v in next, properties do | |
25 | pcall(function() inst[i] = v end) | |
26 | end | |
27 | end | |
28 | return inst; | |
29 | end | |
30 | local gui = NewInstance("ScreenGui",PlrGui,{}) | |
31 | local txt = NewInstance("TextLabel",gui,{TextStrokeTransparency=.3,TextStrokeColor3=Color3.fromRGB(32, 205, 255),Font=Enum.Font.Arcade,BackgroundTransparency=1,Size=UDim2.new(.48,0,.1,0),Position=UDim2.new(.279,0,.842,0),Text='SPD:',TextColor3=Color3.fromRGB(35, 205, 255),TextScaled=true,TextWrapped=true,}) | |
32 | ||
33 | local neck = Instance.new("Weld",char) | |
34 | neck.Part0 = char.Torso | |
35 | neck.Part1 = char.Head | |
36 | neck.C0 = CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
37 | local human2 = Instance.new("Weld",char) | |
38 | human2.Part0 = char.HumanoidRootPart | |
39 | human2.Part1 = char.Torso | |
40 | human2co = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
41 | necc = CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
42 | local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone() | |
43 | local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso) | |
44 | rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
45 | rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"] | |
46 | rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1) | |
47 | local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone() | |
48 | local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso) | |
49 | lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
50 | lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"] | |
51 | lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1) | |
52 | local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso) | |
53 | llegweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
54 | llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"] | |
55 | llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0) | |
56 | local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone() | |
57 | game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove() | |
58 | local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso) | |
59 | rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
60 | rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"] | |
61 | rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0) | |
62 | holding = false | |
63 | bljing = false | |
64 | spd = 16 | |
65 | function PlayAnim(animation) | |
66 | if animation == "BLJ" then | |
67 | bljing = true | |
68 | for i = 0,1 ,0.3 do | |
69 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.53661108, -0.480926514, 0.999894381, -0.0142589128, -0.00281370035, -0.000413000147, 0.165641978, -0.986185849, 0.0145280054, 0.986082852, 0.165618598),i) | |
70 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.50725269, -0.75819397, 1, 0, 0, 0, 0.665795922, -0.746133924, 0, 0.746133924, 0.665795922),i) | |
71 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.426974773, -0.494689941, 1, 0, 0, 0, 0.210759029, -0.977538109, 0, 0.977538109, 0.210759029),i) | |
72 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.61069536, -0.782699585, 1, 0, 0, 0, 0.730954409, -0.682426393, 0, 0.682426393, 0.730954409),i) | |
73 | game:GetService("RunService").RenderStepped:wait() | |
74 | end | |
75 | yAhOo:Play() | |
76 | for i = 0,1 ,0.3 do | |
77 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.426974535, -0.494689941, 1, 0, 0, 0, -0.0134780025, -0.999909222, 0, 0.999909222, -0.0134780025),i) | |
78 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -0.987535715, -0.751152039, 1, 0, 0, 0, -0.0135450047, -0.999908328, 0, 0.999908328, -0.0135450047),i) | |
79 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.06637633, -0.78163147, 1, 0, 0, 0, -0.00196000026, -0.999998093, 0, 0.999998093, -0.00196000026),i) | |
80 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.536610603, -0.480926514, 0.999894381, -0.0145326061, -0.000187743455, -0.000411000132, -0.0153610073, -0.999881983, 0.0145280054, 0.999776483, -0.0153653575),i) | |
81 | game:GetService("RunService").RenderStepped:wait() | |
82 | end | |
83 | end | |
84 | if animation == "NoAnims" then | |
85 | bljing = false | |
86 | spd = 16 | |
87 | for i = 0,1 ,0.03 do | |
88 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i) | |
89 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i) | |
90 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i) | |
91 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i) | |
92 | end | |
93 | end | |
94 | end | |
95 | ||
96 | function BackwardsLongJump() | |
97 | if not holding then | |
98 | holding = true | |
99 | while holding == true do | |
100 | PlayAnim("BLJ") | |
101 | end | |
102 | PlayAnim("NoAnims") | |
103 | end | |
104 | end | |
105 | ||
106 | mouse = plr:GetMouse() | |
107 | mouse.KeyDown:connect(function(k) | |
108 | if k == "e" then | |
109 | BackwardsLongJump() | |
110 | end | |
111 | end) | |
112 | mouse.KeyUp:connect(function(k) | |
113 | if k == "e" then | |
114 | holding = false | |
115 | end | |
116 | end) | |
117 | ||
118 | while true do | |
119 | if spd > 16 then | |
120 | txt.Text = "SPD:" .. spd | |
121 | else | |
122 | txt.Text = "SPD:" .. spd | |
123 | end | |
124 | if bljing then | |
125 | spd = spd + 1 | |
126 | else | |
127 | spd = 16 | |
128 | end | |
129 | char.Humanoid.WalkSpeed = spd | |
130 | game:GetService("RunService").RenderStepped:wait() | |
131 | end |