diff --git a/cheat.py b/cheat.py index e3baadc..8e4ef6e 100644 --- a/cheat.py +++ b/cheat.py @@ -25,5 +25,7 @@ class Cheat(Bhop, Radarhack, Glow, Trigger, if not func.startswith("_") # Hack loop if not func == "hack_loop" + # Unloaders + if not func.endswith("_unload") # Utils if not func.startswith("find_")] diff --git a/main.py b/main.py index 9b58249..2e9df22 100644 --- a/main.py +++ b/main.py @@ -50,5 +50,15 @@ if __name__ == "__main__": t.start() # Don't close the main thread as cheats are daemons - while True: - sleep(1000000) + try: + while True: + sleep(1000000) + except KeyboardInterrupt: + for fn in [c.cheats_list[i] for i in c_id]: + try: + unloader = getattr(c, f"{fn}_unload") + except: + pass + else: + print(f"Unload {fn}...") + unloader()