-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgtahelper.py
42 lines (32 loc) · 834 Bytes
/
gtahelper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import pynput
from threading import Thread
import casinoheist
import cayoperico
pressed = []
def on_press(key):
"""Function used by pynput for it listener"""
if key in pressed:
return True
pressed.append(key)
try:
k = key.char
except:
k = key.name
if k == "f8":
return False
elif k == "f5":
thread = Thread(target = casinoheist.digit_hack)
thread.start() # run an async task so it can killed by pressing F8
elif k == "f6":
thread = Thread(target = cayoperico.digit_hack)
thread.start()
elif k == "f7":
thread = Thread(target = casinoheist.hacking_machine)
thread.start()
def on_release(key):
"""Function used by pynput for it listener"""
if key in pressed:
pressed.remove(key)
listener = pynput.keyboard.Listener(on_press = on_press, on_release = on_release)
listener.start()
listener.join()