An automated bot for playing the Elm Wealth coin flip game using Selenium WebDriver. This project includes both GUI and headless versions of the bot, along with data visualization tools.
This project automates gameplay on the Elm Wealth coin flip game website (https://elmwealth.com/coin-flip/). The bot automatically:
- Selects "heads" for each coin flip
- Bets 20% of current balance
- Continues playing until the game timer runs low
- Records gameplay data and takes screenshots
gameCode.py
- Main bot with GUI Chrome browsergameCodeHeadless.py
- Headless version of the bot (runs in background)randomWalk_Visualizer.py
- Visualizes the gameplay data as a graphCoinFlipGameData.txt
- Game data file containing balance values and timestampsscreenshot_*.png
- Screenshots taken at the end of gameplay sessions
selenium
matplotlib
Install dependencies:
pip install selenium matplotlib
You'll also need Chrome WebDriver installed and accessible in your PATH.
With GUI (visible browser):
python gameCode.py
Headless mode (background):
python gameCodeHeadless.py
After running the bot, visualize the balance progression:
python randomWalk_Visualizer.py
- Opens the Elm Wealth coin flip game website
- Waits for the game to load and starts a new game
- Continuously:
- Selects "heads"
- Bets 20% of current balance
- Waits for game overlay to disappear
- Records balance and timestamp
- Stops when game timer reaches 4 seconds remaining
- Takes a final screenshot
- Saves all data to
CoinFlipGameData.txt
The CoinFlipGameData.txt
file contains alternating lines of:
- Balance amount (float)
- Remaining time (MM:SS format)
- Stops automatically when timer gets low (4 seconds remaining)
- Takes screenshots for verification
- Uses explicit waits to handle page loading
This bot is for educational purposes only. Use responsibly and in accordance with the website's terms of service.