thatpastebinner

BEST FUNKY FRIDAY AUTOPLAY

May 2nd, 2021
2,618
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.49 KB | None | 0 0
  1. local mode = 1 -- Starting mode. 0 = Legit, wont hit 100% accurately : 1 = Rage, hits everythings with 100% accuracy : 2 = Disabled
  2. local maxdelay = .01 -- Maximum delay b4 hitting a note while using legit mode, recomending max is .16, any higher and youll start missing a lot
  3.  
  4. -- Main Script Below
  5.  
  6. local framework;
  7. local funcs = {}
  8. local islclosure = islclosure or is_l_closure
  9. local getinfo = getinfo or debug.getinfo
  10. local getupvalues = getupvalues or debug.getupvalues
  11. local getconstants = getconstants or debug.getconstants
  12. local marked = {}
  13. local map = { [0] = 'Left', [1] = 'Down', [2] = 'Up', [3] = 'Right', }
  14. local keys = { Up = Enum.KeyCode.W; Down = Enum.KeyCode.S; Left = Enum.KeyCode.A; Right = Enum.KeyCode.D; }
  15. local runService = game:GetService('RunService')
  16. local fastWait, fastSpawn do
  17.   function fastWait(t)
  18.       local d = 0;
  19.       while d < t do
  20.           d += runService.RenderStepped:wait()
  21.       end
  22.   end
  23.   function fastSpawn(f)
  24.       coroutine.wrap(f)()
  25.   end
  26. end
  27.  
  28. for i, v in next, getgc(true) do
  29.   if type(v) == 'table' and rawget(v, 'GameUI') then
  30.       framework = v;
  31.   end
  32.   if type(v) == 'function' and islclosure(v) then
  33.       local info = getinfo(v);
  34.       if info.name == '' then continue end
  35.       if info.source:match('%.Arrows$') then
  36.           local constants = getconstants(v);
  37.           if table.find(constants, 'Right') and table.find(constants, 'NewThread') then
  38.               funcs.KeyDown = v;
  39.           elseif table.find(constants, 'Multiplier') and table.find(constants, 'MuteVoices') then
  40.               funcs.KeyUp = v;
  41.           end
  42.       end
  43.   end
  44.   if framework and funcs.KeyUp and funcs.KeyDown then break end
  45. end
  46. if type(framework) ~= 'table' or (not rawget(framework, 'UI')) then
  47.   return game.Players.LocalPlayer:Kick('Failed to locate framework.')
  48. elseif (not (funcs.KeyDown and funcs.KeyUp)) then
  49.   return game.Players.LocalPlayer:Kick('Failed to locate key functions.')
  50. end
  51. game:GetService("UserInputService").InputBegan:Connect(function(key,bool)
  52.   if key.KeyCode == Enum.KeyCode.Delete then
  53.       mode = mode + 1
  54.       if mode == 1 then
  55.           print("Mode changed to rage")
  56.       elseif mode == 2 then
  57.           print("Mode changed to disabled")
  58.       elseif mode == 3 then
  59.           mode = 0; print("Mode changed to legit")
  60.       end
  61.   end
  62. end)
  63. while runService.RenderStepped:wait() do
  64.   if mode ~= 2 then
  65.       for _, arrow in next, framework.UI.ActiveSections do
  66.           if _ == 1 then
  67.           else
  68.               if arrow.Side ~= framework.UI.CurrentSide then continue end
  69.               if marked[arrow] then continue end
  70.               local index = arrow.Data.Position % 4
  71.               local position = map[index]
  72.               if (not position) then continue end
  73.               local distance = (1 - math.abs(arrow.Data.Time - framework.SongPlayer.CurrentlyPlaying.TimePosition)) * 100
  74.               if distance >= 95 then
  75.                   marked[arrow] = true;
  76.                   fastSpawn(function()
  77.                       if mode == 0 then wait(Random.new():NextNumber(0.02, maxdelay)) else end
  78.                       funcs.KeyDown(position)
  79.                       if arrow.Data.Length > 0 then
  80.                           fastWait(arrow.Data.Length)
  81.                       else
  82.                           fastWait(0.05)
  83.                       end
  84.                       funcs.KeyUp(position)
  85.                       marked[arrow] = nil
  86.                   end)
  87.               end
  88.           end
  89.       end
  90.   end
  91. end
Advertisement
Add Comment
Please, Sign In to add comment