This is a simple TriggerBot for Counter-Strike 2. The TriggerBot automatically fires when the crosshair is on an enemy player.
- Automatically shoots when aiming at an enemy.
- Uses offsets from a remote source to stay updated.
- Configurable trigger key.
- Logs activity and errors for easy debugging.
- Python 3.7+
pymem
keyboard
pynput
requests
pywin32
-
Clone the repository or download the script.
git clone https://github.com/Jesewe/cs2-triggerbot.git cd cs2-triggerbot
-
Install the required Python libraries.
pip install pymem keyboard pynput requests pywin32
-
Run the script.
python main.py
- Trigger Key: The default trigger key is
X
. You can change this by modifying thetriggerKey
variable in the script. - Application Name: The default application name is set to
Counter-Strike 2
. Ensure this matches the window title of your game.
- Start Counter-Strike 2.
- Run the
main.py
script. - Press and hold the trigger key (
X
by default) when your crosshair is on an enemy to automatically shoot.
The script performs the following steps:
- Fetches the latest offsets and client data from a remote source.
- Initializes
Pymem
to access the game's memory. - Continuously checks if the game window is active and if the trigger key is pressed.
- If the trigger key is pressed, reads the player's data and entity list from the game's memory.
- If an enemy is detected under the crosshair, simulates a mouse click to shoot.
The script logs important events and errors. The log includes timestamps and error messages, which can be helpful for debugging.
- Ensure that Counter-Strike 2 is running and the window title matches
Counter-Strike 2
. - Make sure you run the script with sufficient permissions to access the game's memory.
- Verify that the offsets are up to date. If the game updates, the offsets might change, and you will need to fetch the latest ones.
This script is for educational purposes only. Using cheats or hacks in online games is against the terms of service of most games and can result in bans or other penalties. Use this script at your own risk.
This project is licensed under the MIT License. See the LICENSE file for details.