Skip to content

Instantly share code, notes, and snippets.

@brettinternet
Last active April 5, 2022 20:23
Show Gist options
  • Save brettinternet/7ac6fcf82c1387bdb71ceb3870aaa7e2 to your computer and use it in GitHub Desktop.
Save brettinternet/7ac6fcf82c1387bdb71ceb3870aaa7e2 to your computer and use it in GitHub Desktop.
anti afk for games
; Ocassionally moves mouse to a random location
; Use Win+z to enable/disable
Pause On ; Start paused
Loop
{
Random, x, -10, 10
Random, y, -10, 10
Random, SleepDelay, 600, 18000
MouseMove %x%,%y%,1,R
Sleep % SleepDelay
}
#z::Pause ; Windows + z to toggle pause
Pause On ; Start paused
; randomly keydown these keys
keys := ["e", "e", "z", "c", "x", "1", "2"]
Loop
{
Random, rand, 1, keys.Length()
key := % keys[rand]
Send {%key% down}
Sleep rand * 100
Send {%key% up}
Sleep rand * 1000 / 2
}
#z::Pause ; Windows + z to toggle pause
#esc::Exitapp ; Close the script with Windows + Escape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment