Advertisement
4Epic

Improved AutoHotkey UWP roblox cursor fix

Aug 13th, 2023
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. -- Improved AutoHotkey UWP roblox cursor fix
  2. -- AutoHotKey required https://www.autohotkey.com/
  3. -- F6 to toggle
  4.  
  5. #Persistent
  6. #NoEnv
  7.  
  8. Toggle := false
  9.  
  10. F6::
  11. Toggle := !Toggle
  12. If (Toggle)
  13. {
  14. SetTimer, PreventGlitch, 1
  15. }
  16. Else
  17. {
  18. SetTimer, PreventGlitch, Off
  19. }
  20. Return
  21.  
  22. PreventGlitch:
  23. if (Toggle && GetKeyState("RButton", "P") && !IsTeleporting)
  24. {
  25. IsTeleporting := true
  26. MouseGetPos, StartX, StartY
  27. While GetKeyState("RButton", "P")
  28. {
  29. Sleep, 1
  30. }
  31. MouseGetPos, EndX, EndY
  32. DllCall("SetCursorPos", "int", EndX, "int", EndY)
  33. Sleep, 1
  34. DllCall("SetCursorPos", "int", StartX, "int", StartY)
  35. IsTeleporting := false
  36. }
  37. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement