Dice bot simulator
How the dice bot simulator works
Write a strategy in Lua in the editor above. The top of the script runs once to set chance, basebet and the first nextbet. Then the engine calls your dobet() after every roll, and you set the next bet. Templates loads a working script to start from.
Rolls use the provably-fair HMAC-SHA512 scheme: server seed, client seed and nonce, so the same seeds always give the same rolls. The Lua engine runs in a Web Worker on your machine, and your script is never sent to a server to run a simulation.
The chart plots the balance as the run goes, and the stats show profit, drawdown and streaks. The Bets tab lists each bet (nonce, roll, target, bet, payout, balance) for the last 1,000,000 bets, with win and loss filters.
Stress Test runs the same script on five seed pairs at once, so you can see how much of a result is luck. Auto-Tuner tries values for the params a script reads, runs each on the same seeds and ranks them.
Quick reference
The globals most scripts use. The Lua reference lists all of them with examples.
| Name | Kind | What it does |
|---|---|---|
| chance | read/write | Win chance in percent for the next bet, from 0.01 to 98. |
| bethigh | read/write | true bets over the target, false bets under it. |
| nextbet | read/write | Amount of the next bet. |
| previousbet | read-only | Amount of the bet that just settled. |
| balance | read-only | Current balance, not counting vaulted funds. |
| win | read-only | true if the last roll won. |
| currentstreak | read-only | Wins in a row as a positive number, losses in a row as a negative one. |
| dobet() | function | Your function. The engine calls it after every roll. |
| stop() | function | Ends the run after the current roll. |
| vault(amount) | function | Moves an amount out of the balance. Vaulted funds count as profit and are never bet. |
Example scripts
Each example has a page with the full code, a step-by-step explanation and the streak math.
- Martingale scriptDoubles the bet after each loss and goes back to the base bet after a win.
- Delayed escalation scriptBets 3.35% for a 29.55x payout. Flat bets through 50 losses, then 4% more per loss.
- Paroli 3-step scriptDoubles after a win, banks the profit after 3 wins in a row, resets on any loss.
- Dynamic recovery scriptSizes each bet so one win recovers the drawdown plus one base bet, capped at 10% of balance.
- D'Alembert scriptAdds one unit after a loss and removes one after a win, never going below the base bet.
- Labouchere scriptBets the first plus the last number of a list. Wins cross numbers off, losses add one.
- Fibonacci scriptBets follow the Fibonacci sequence: one step up after a loss, two steps back after a win.
- Oscar's Grind scriptPlays in cycles that aim for +1 unit: same bet after a loss, one unit more after a win.
- 1-3-2-6 scriptBets 1, 3, 2 and 6 units on consecutive wins. Any loss, or the 4th win, resets to 1.
- Flat betting scriptSame bet on every roll, with a stop loss and a take profit at 10% of the starting balance.
- Fixed wager in sats scriptBets 100 sats flat, needs 100,000 sats to start, stops at +10,000 or -20,000 sats.
- Martingale + vault scriptMartingale that moves half of every 1% profit step to the vault with vault().
FAQ
Is the dice bot simulator free?
Yes. Without an account you can run up to 100,000 rolls per run, and your script is kept in this browser. With an account the limit is 10,000,000 rolls per run and you can save strategies.
Does the simulator place real bets?
No. Every roll is generated on your device from the seeds (or replayed results) in Settings. DiceSim never connects to a casino account and nothing is wagered.
How fast does it run?
It depends on your device and on how much work dobet() does per roll. The run controls show rolls per second, and runs are split into batches so the page stays responsive.
Can I replay seeds from a casino?
Yes, if the casino uses the same HMAC-SHA512 scheme. Open Settings, then Seeds & replay, and paste the revealed server seed, your client seed and the starting nonce. The engine regenerates the same rolls. For other schemes, switch to Replay and paste the roll results.