This commit is contained in:
Mylloon 2023-03-30 11:26:52 +02:00
parent 08a251c984
commit 813dc6e87d
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

47
main.py Normal file
View file

@ -0,0 +1,47 @@
from time import sleep
from pymem import Pymem
from win32api import GetAsyncKeyState
# offsets
LOCAL_PLAYER = 14596452
FORCE_JUMP = 86756784
HEALTH = 256
FLAGS = 260
def bhop() -> None:
pm = Pymem("csgo.exe")
# Get module address
for module in list(pm.list_modules()):
if module.name == "client.dll":
client = module.lpBaseOfDll
# Hack loop
while True:
# Reduce CPU usage
sleep(0.01)
# Space bar detection
if not GetAsyncKeyState(ord(" ")):
continue
# Get local player
local_player: int = pm.read_uint(client + LOCAL_PLAYER)
if not local_player:
continue
# Check if player is alive
if not pm.read_int(local_player + HEALTH):
continue
# Check if player on ground
if pm.read_uint(local_player+FLAGS) & 1 << 0:
pm.write_uint(client + FORCE_JUMP, 6)
sleep(0.01)
pm.write_uint(client + FORCE_JUMP, 4)
if __name__ == "__main__":
bhop()