-
Notifications
You must be signed in to change notification settings - Fork 6
/
ruby.py
35 lines (27 loc) · 966 Bytes
/
ruby.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
import keyboard
import pymem
import pymem.process
import time
from win32gui import GetWindowText, GetForegroundWindow
dwForceJump = (0x51F4D88)
dwLocalPlayer = (0xD36B94)
m_fFlags = (0x104)
def main():
print("Ruby has launched.")
pm = pymem.Pymem("csgo.exe")
client = pymem.process.module_from_name(pm.process_handle, "client.dll").lpBaseOfDll
while True:
if not GetWindowText(GetForegroundWindow()) == "Counter-Strike: Global Offensive":
continue
if keyboard.is_pressed("space"):
force_jump = client + dwForceJump
player = pm.read_int(client + dwLocalPlayer)
if player:
on_ground = pm.read_int(player + m_fFlags)
if on_ground and on_ground == 257:
pm.write_int(force_jump, 5)
time.sleep(0.08)
pm.write_int(force_jump, 4)
time.sleep(0.002)
if __name__ == '__main__':
main()