An efficient, fully-automated hacking system for Bitburner that uses HWGW (Hack-Weaken-Grow-Weaken) batching to maximize income. This system automatically utilizes all available servers across your network for maximum efficiency.
- Fully Automated: One command to start everything
- HWGW Batching: Industry-standard batch scheduling with proper timing
- Network-Wide Execution: Uses ALL servers (home, purchased, and rooted network servers)
- Smart Target Selection: Automatically picks the most profitable target
- Dynamic RAM Management: Distributes threads across all available servers
- Auto-Prep: Prepares target to max money and min security
- Multi-Batch Support: Runs multiple batches in parallel for maximum throughput
- Self-Healing: Automatically re-preps if target drifts
-
Worker Scripts (
hack.js,grow.js,weaken.js)- Minimal one-shot scripts that perform single operations
- Used 1.75 GB RAM each
- Automatically distributed to all servers
-
Utilities (
utils.js)- Network scanning and server discovery
- Auto-rooting with available port crackers
- Target selection based on profitability
- RAM management across all servers
-
Batcher (
batcher.js)- Advanced HWGW batch scheduler
- Calculates optimal thread counts
- Times operations to land in perfect sequence
- Runs multiple parallel batches
- Distributes work across entire network
-
Master Control Program (
mcp.js)- Main orchestrator script
- Roots all accessible servers
- Selects best target
- Launches the batcher
-
Monitor (
monitor.js)- Real-time dashboard for target stats
- Shows money %, security levels, timing
- Displays RAM usage and income
-
Purchased Server Manager (
pserv-manager.js)- Automatically buys and upgrades purchased servers
- Optimizes spending for maximum RAM
- Use your in-game sync script to pull files from this GitHub repo
- Make sure all files in
files.txtare downloaded tohome
run mcp.jsThat's it! The MCP will:
- Root all accessible servers on the network
- Select the most profitable target
- Launch the batcher with optimized settings
run mcp.js 0.05 # Steal 5% per batch (safer, more batches)
run mcp.js 0.10 # Steal 10% per batch (default)
run mcp.js 0.25 # Steal 25% per batch (fewer but bigger batches)Note: Lower percentages = more batches in parallel = higher total income (if you have enough RAM)
run monitor.js n00dles # Replace with your target namerun pserv-manager.js 32 # Buy servers with minimum 32 GB RAMThe manager will:
- Buy new servers up to the limit (25)
- Upgrade your smallest server when possible
- Only spend 10% of money on new servers, 25% on upgrades
Each batch consists of 4 operations that land in sequence:
- Hack - Steals money from target
- Weaken - Removes security added by hack
- Grow - Restores stolen money
- Weaken - Removes security added by grow
- Operations land with 100ms gaps (configurable)
- Multiple batches run in parallel
- Each batch starts 1000ms after the previous one
- Target stays at max money and min security
- Utilizes 100% of available RAM across all servers
The batcher automatically:
- Calculates exact threads needed for each operation
- Distributes threads across ALL available servers
- Sorts servers by available RAM for optimal allocation
- Ensures operations have proper delays to land on time
- Start with low steal percentage:
run mcp.js 0.05 - Focus on getting more purchased servers
- Run
pserv-manager.jsto automate server purchases - Target easier servers with high money/time ratios
- Increase steal percentage as you get more RAM:
run mcp.js 0.25 - Upgrade purchased servers to 1024+ GB
- System will automatically run more parallel batches
- Income scales exponentially with available RAM
The batcher itself needs ~5 GB on home. Make sure you have space, or kill other scripts.
- Check RAM usage with
run monitor.js - Lower your steal percentage to reduce RAM requirements per batch
- Upgrade/buy more purchased servers
- Normal for lower hack levels (operations take longer)
- System will auto-re-prep
- As you level up, drift decreases
- Wait for first batch to complete (can take several minutes)
- Check that operations are running:
psor monitor - Verify target has money:
run monitor.js target-name
- Each worker script: 1.75 GB
- Batch size varies based on target and steal %
- Typical batch: 50-500 threads = 87.5 - 875 GB
- More RAM = more parallel batches = exponentially more income
Operations are timed so all 4 finish in the correct order:
Hack finishes: T + 0ms
Weaken1 finishes: T + 100ms
Grow finishes: T + 200ms
Weaken2 finishes: T + 300ms
Each operation starts with a calculated delay to land at the right time.
- Hack threads: Based on % of max money to steal
- Weaken threads: Security increase / 0.05
- Grow threads:
ns.growthAnalyze()for money recovery - Weaken threads: Security increase / 0.05
hack.js- Worker script for hackinggrow.js- Worker script for growingweaken.js- Worker script for weakeningutils.js- Network scanning and utilitiesbatcher.js- Core batching enginemcp.js- Main orchestratormonitor.js- Real-time stats dashboardpserv-manager.js- Automated server purchasingfiles.txt- List of files for sync script
This is a personal Bitburner script repository. Feel free to fork and customize for your own use!
Based on community HWGW batching concepts. Optimized for mid-game efficiency and ease of use.