Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FNF Script 😱
- -- the accurancy depends on fps
- -- change 0.3 to some number until it works perfectly for you (mine works at 0.3) (local del = 0.3)
- local syn = {}
- syn.get_thread_identity = getthreadcontext
- syn.set_thread_identity = setthreadcontext
- local vim = game:GetService("VirtualInputManager")
- local plr = game:GetService("Players").LocalPlayer
- local root = plr.Character.HumanoidRootPart
- local del = 0.3 -- the accurancy depends on fps
- -- change 0.3 to some number until it works perfectly for you (mine works at 0.3)
- local function getpos()
- local parts = workspace.Stages:GetDescendants()
- local nearest = nil;
- local closest = 0;
- for i,v in pairs(parts) do
- if v.Name:sub(1, 1) == "P" and v:IsA("BasePart") then
- if closest < (root.Position - v.Position).Magnitude then
- nearest = v
- closest = (root.Position - v.Position).Magnitude
- end
- end
- end
- return nearest.Name:gsub("%D+", "")
- end
- local keymap = {
- ["U"] = Enum.KeyCode.W,
- ["D"] = Enum.KeyCode.S,
- ["L"] = Enum.KeyCode.A,
- ["R"] = Enum.KeyCode.D
- }
- local player = game:GetService("Players").LocalPlayer
- local gui = player.PlayerGui
- local function hit(key, await)
- wait(2 / await - del)
- vim:SendKeyEvent(true, keymap[key], false, game)
- end
- gui.ChildAdded:Connect(function(ui)
- if ui.Name == "FNFMode" then
- local scr = ui:WaitForChild("FNFMain")
- local succ, env = pcall(getsenv, scr)
- if not succ then
- wait(2)
- succ, env = pcall(getsenv, scr)
- end
- local orig = env.Note
- local our = getpos();
- env.Note = function(key, opp, await)
- local old = syn.get_thread_identity()
- syn.set_thread_identity(7)
- local turn = opp:gsub("%D+", "")
- print(tonumber(our), tonumber(turn))
- if tonumber(our) ~= tonumber(turn) then
- coroutine.wrap(hit)(key, await)
- end
- syn.set_thread_identity(old)
- return orig(key, opp, await)
- end
- end
- end)
- game.StarterGui:SetCore("SendNotification", {
- Title = "Script loaded.";
- Text = "enjoy being pro!!";
- Duration = 16;
- Callback = bindableFunction;
- })
Add Comment
Please, Sign In to add comment