-
Notifications
You must be signed in to change notification settings - Fork 0
/
gtaglitch.py
51 lines (40 loc) · 984 Bytes
/
gtaglitch.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
43
44
45
46
47
48
49
50
51
import pyautogui as gui
import time
from random import randint
import keyboard
# Basic Commands
def click(x, y): gui.click(x, y)
def wait(t): time.sleep(t)
def find_location():
while True:
time.sleep(1)
x, y = gui.position()
print("X:", x, "Y:", y, "RGB:", gui.screenshot().getpixel(gui.position()))
if x == 0 and y == 0:
break
def main():
click(539, 362)
while True:
try:
if keyboard.is_pressed('q'):
print("closing program")
return
else:
click(700, 650) # Place Bet
wait(1)
click(400, 250) # Click Horse 1
wait(1)
for x in range(1, 7):
click(777, 400) # Click Left arrow 7 times
wait(0.5)
wait(1)
click(777, 400) # Click Left arrow 1 more time
gui.dragTo(700, 600, 40) # drags to place bet
wait(1)
gui.click(button="right")
wait(1)
except:
return
# X: 539 Y: 362
# find_location()
main()