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()