Advertisement
pa1nx9

auto type

Nov 1st, 2021
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. _G.wpmlimit = 150 -- Max WPM you can hit, will start stuttering at this limit
  2. _G.keydelay = 0.075 -- Delay between keys to seem more legit. 0.075 ~ 144wpm
  3.  
  4. local vim = game:GetService("VirtualInputManager") -- I specifically did this bc keypress used only VK bytecodes
  5. -- Interpreting straight letter to VIM seems to be faster than using VK, and it works without needing game focus
  6.  
  7. ---- vvvvv I DID NOT MAKE ANYTHING IN THIS SECTION vvvvv ----
  8. local function findLetterTable()
  9. for i,obj in pairs( getgc() ) do
  10. if type(obj) == "function" and getfenv(obj).script == game:GetService("Players").LocalPlayer.PlayerGui.LocalMain then
  11. local consts=debug.getconstants(obj)
  12. if consts[8]=="idXTO3JVlV0CBTmiSbaQ" then
  13. --local tab=debug.getupvalue(obj,4)
  14. return debug.getupvalue(obj,4) -- FULL CREDIT TO IDoN0t ON V3RM FOR THIS THING [showthread.php?tid=1140292]
  15. end end end end -- I have no idea what's going on in this thing, other than just raw letters come out of it
  16. ---- ^^^^^ I DID NOT MAKE ANYTHING IN THIS SECTION ^^^^^ ----
  17.  
  18. local descendants = findLetterTable()
  19. for index, descendant in pairs(descendants) do
  20. if string.upper(descendant) ~= " " then -- Remnant of an old method of getting letters
  21. local key = Enum.KeyCode[string.upper(descendant)]
  22. vim:SendKeyEvent(1,key,0,nil)
  23. vim:SendKeyEvent(0,key,0,nil)
  24. else
  25. vim:SendKeyEvent(1,32,0,nil) -- This is how I used to interpret spaces safely
  26. vim:SendKeyEvent(0,32,0,nil) -- It's crusty, but it works
  27. end
  28. while tonumber(game.Players.LocalPlayer.PlayerGui.ScreenGui.Main.RaceScreen.LiveStats.WPM.Stat.Text) > _G.wpmlimit do
  29. task.wait() -- This section hard limits at the set WPM cap. Should this also be keydelay so it's less jittery/stuttery?
  30. end
  31. wait(_G.keydelay)
  32. if game.Workspace:FindFirstChild("Doll") then -- To avoid bugs with non RLGL modes
  33. while game:GetService("SoundService").DollSaying.TimePosition > 5 or game:GetService("SoundService").DollSaying.TimePosition <= 0 do
  34. task.wait() -- I encourage experimenting with the timepos to squeeze the most out of the time you have. 5 is the highest it's reliable at.
  35. end
  36. end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement