Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import threading
- from time import sleep, time,strftime
- from random import randint,uniform
- from mouse import press, release
- from keyboard import is_pressed
- from humanize_zucc import imageFind,imageLocation,humanClick,humanClickHold,humanClickRealse,humanMove, humanKeyp,humanMoverel
- forceStop = False
- paused = True
- reset = True
- start = time()
- timerLimit = 69*69
- #edit these to your keybind
- forwardMoveKey = ""
- backMoveKey = ""
- leftMoveKey = "z"
- rightMoveKey = "x"
- def main():
- print("started")
- while not forceStop:
- if not paused:
- afk()
- stime = uniform(0.1,1)
- sleep(stime)
- sleep(0.5)
- def afk():
- global reset, start,timerLimit
- if reset:
- print("Randomizing timer")
- reset = False
- start = time()
- timer = int(time() - start)
- timerLimit = randint(300,1200)
- print("Anti-AFK in:{} min".format(timerLimit/60))
- timer = int(time() - start)
- if timer > timerLimit:
- reset = True
- timesToLoop = randint(0,10)
- for i in range(timesToLoop):
- if forceStop or paused:
- break
- chance = randint(0,100)
- if chance >= 50:
- humanKeyp(leftMoveKey)
- else:
- humanKeyp(rightMoveKey)
- x = randint(-100,100)
- y = randint(-100,100)
- chanceToLook = randint(0,100)
- if chanceToLook >= 50:
- humanClickHold("right")
- humanMoverel(x,y,3,8,-5,5)
- humanClickRealse("right")
- def stopAll():
- global forceStop, paused
- key = "f12"
- on_off = False
- while not forceStop:
- try:
- if is_pressed(key):
- if on_off:
- print('Paused afk')
- paused = True
- on_off = False
- while is_pressed(key):
- sleep(0.1)
- elif not on_off:
- print('UnPaused afk')
- paused = False
- on_off = True
- while is_pressed(key):
- sleep(0.1)
- if is_pressed("f11"):
- print("force closed app")
- forceStop = True
- sleep(0.01)
- except Exception as e:
- print("#ERROR debug Info {}\n".format(e))
- appendFile = open('logs/logfile_startdata_errors.txt','a')
- appendFile.write('ERROR(stopAll) @{} Info {}\n'.format(strftime("%c"),e))
- appendFile.close()
- else:
- sleep(0.01)
- start_timer = threading.Thread(target=stopAll)
- start_timer.start()
- starter = threading.Thread(target=main)
- starter.start()
Advertisement
Add Comment
Please, Sign In to add comment