Dice bot simulator
How the dice bot simulator works
You write a strategy in Lua in the editor above. The top level of the script runs once to set chance, basebet and the first nextbet. After that the engine calls your dobet() function after every roll, and you set the next bet from what just happened. The Templates menu loads a working script if you want a starting point.
Each roll comes from the provably-fair HMAC-SHA512 scheme: it is computed from a server seed, a client seed and a nonce, so the same seeds always give the same sequence. The Lua engine runs in a Web Worker on your machine, so running a simulation does not send your script to a server.
While a run is going, the chart plots the balance and the stats panel tracks profit, wagered amount and drawdown. The Bets tab lists each bet with its nonce, roll, target, bet size, payout and balance, up to the most recent 1,000,000 bets, and can filter wins or losses.
The Stress Test tab runs the same script on five seed pairs at once, which shows how much of a result is luck. The Auto-Tuner tries different values for the params a script reads, runs each combination 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 its own page with the full code, an explanation of every step and the streak math for its default settings.
- 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.
- 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 the replayed results) in the config panel. DiceSim does not connect 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 control bar shows the speed in rolls per second while a run is going, and the run is 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. Paste the revealed server seed, your client seed and the starting nonce under Seeds & replay, and the engine regenerates the same rolls. For a casino with a different scheme, switch to Replay history and paste the roll results themselves.