Roblox-Buyer
Telegram bot for validating Roblox cookies, checking donation history, refreshing payable cookies, and crediting sellers through CryptoBot checks.
Features
- Cookie intake from plain text or
.txtfiles. - Concurrent Roblox cookie validation with optional proxies.
- Lifetime and yearly donation rate matching.
- AVG pricing for large batches of donation cookies.
- Cookie refresh before storage and payout.
- User balances, withdrawals, referrals, statistics, and bans.
- Admin controls for rates, shop/bot toggles, broadcasts, treasury, and user management.
Requirements
- Python 3.10 or newer.
- Telegram bot token.
- CryptoBot API token for withdrawals and treasury top-ups.
- An administrator Telegram user ID.
Install the runtime dependencies in a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install aiogram aiohttp requests curl-cffi
On Linux or macOS, use source .venv/bin/activate instead of the PowerShell activation command.
Configuration
Copy .env.example and set at least:
BOT_TOKEN=your_telegram_bot_token
ADMIN_ID=your_telegram_user_id
CRYPTO_PAY_TOKEN=your_cryptobot_api_token
The application reads environment variables through config.py. It does not load .env files automatically, so provide the variables through your shell, process manager, container, or another environment loader.
For PowerShell:
$env:BOT_TOKEN = "your_telegram_bot_token"
$env:ADMIN_ID = "123456789"
$env:CRYPTO_PAY_TOKEN = "your_cryptobot_api_token"
python main.py
The default local paths are:
Users/for user records.filesforcookie/for temporary cookie files.bot_config.jsonfor rates, treasury, and feature toggles.bot_stats.jsonfor aggregate statistics.proxies.txtfor optional proxy entries.robsec.txtfor refreshed cookies retained by the bot.
These runtime files are ignored by Git. Do not commit bot tokens, CryptoBot tokens, Roblox cookies, user records, or proxy credentials.
Running
Start polling with:
python main.py
Users can start with /start, send cookie text, or upload a .txt file. Administrators can open /admin to manage the shop.
Project Structure
main.py Bot bootstrap and polling
config.py Environment settings and defaults
db/storage.py Config, stats, and proxy persistence
db/users.py User record persistence
models/ Typed data models
services/roblox.py Roblox validation, donation lookup, refresh
services/pricing.py Rate matching and payout calculations
services/withdrawals.py CryptoBot checks and treasury invoices
services/referrals.py Referral payouts
services/admin.py Admin operations
handlers/ Telegram commands, callbacks, and FSM flows
keyboards/ Inline keyboard builders
states/admin.py Admin FSM states
utils/ Parsing, logging, and shared helpers
Security Notes
Roblox cookies are credentials. Treat robsec.txt, uploaded files, and the Users/ directory as sensitive data. Restrict filesystem access, keep backups encrypted, and remove data that is no longer needed.
The CryptoBot integration currently uses the testnet API endpoints in services/withdrawals.py. Review and change those endpoints deliberately before handling production funds.
Verification
Run a syntax check with:
python -m compileall -q .
License
MIT. See LICENSE.