From 1dd7164b3c9d564f58d007c720cc383b62bba134 Mon Sep 17 00:00:00 2001 From: Tim Eifler Date: Mon, 16 Jan 2023 11:11:44 +0100 Subject: [PATCH] Update ruby.py import keyboard import pymem 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 running = True while running: if 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 == 257: pm.write_int(force_jump, 5) time.sleep(0.08) pm.write_int(force_jump, 4) if keyboard.is_pressed("esc"): # check if the "esc" key is pressed running = False # set the running variable to False, which will stop the while loop time.sleep(0.002) if __name__ == '__main__': main() --- ruby.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ruby.py b/ruby.py index 89cf7aa..29e2955 100644 --- a/ruby.py +++ b/ruby.py @@ -1,13 +1,11 @@ import keyboard import pymem -import pymem.process import time from win32gui import GetWindowText, GetForegroundWindow -dwForceJump = (0x51F4D88) -dwLocalPlayer = (0xD36B94) -m_fFlags = (0x104) - +dwForceJump = 0x51F4D88 +dwLocalPlayer = 0xD36B94 +m_fFlags = 0x104 def main(): print("Ruby has launched.") @@ -15,7 +13,7 @@ def main(): client = pymem.process.module_from_name(pm.process_handle, "client.dll").lpBaseOfDll while True: - if not GetWindowText(GetForegroundWindow()) == "Counter-Strike: Global Offensive": + if GetWindowText(GetForegroundWindow()) != "Counter-Strike: Global Offensive": continue if keyboard.is_pressed("space"): @@ -23,13 +21,12 @@ def main(): player = pm.read_int(client + dwLocalPlayer) if player: on_ground = pm.read_int(player + m_fFlags) - if on_ground and on_ground == 257: + if 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()