This is a Bunny Hop (Bhop) script for Counter-Strike 2 (CS2) that automates jumping while holding the space bar, providing a smoother and more consistent bunny hopping experience.
- Automatically jumps when the space bar is held down
- Simple and lightweight script
- Real-time process and memory manipulation using the
pymem
library - Fetches the latest game offsets from an online repository
- Python 3.x
pymem
libraryrequests
library
-
Clone the repository:
git clone https://github.com/Jesewe/cs2-bhop.git cd cs2-bhop
-
Install the required Python libraries:
pip install pymem requests
-
Ensure that Counter-Strike 2 (cs2.exe) is running.
-
Run the script:
python main.py
-
Hold down the space bar to activate the bunny hop.
The script works by:
- Searching for the
cs2.exe
process. - Fetching the memory offsets required for jumping from an online repository.
- Writing to the memory address responsible for the jump action when the space bar is pressed.
fetch_offsets()
: Fetches the latest game offsets from an online repository.get_cs2_process()
: Retrieves thecs2.exe
process.get_client_module(pm)
: Gets theclient.dll
module from the process.bhop()
: Main function that handles the bunny hopping logic.
The script includes error handling for various exceptions, including process not found, module not found, memory read/write errors, and more.
The script uses the logging
module to log important information and errors, making it easier to debug and monitor the script's execution.
This project is licensed under the MIT License. See the LICENSE file for details.
This script is for educational purposes only. Use it at your own risk. The author is not responsible for any consequences resulting from the use of this script, including but not limited to game bans or other punitive actions by game administrators.