Skip to content

Conversation

teifler
Copy link

@teifler teifler commented Jan 16, 2023

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

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant