Skip to content
DiceSim

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.

Most-used Lua globals in the dice bot simulator
NameKindWhat it does
chanceread/writeWin chance in percent for the next bet, from 0.01 to 98.
bethighread/writetrue bets over the target, false bets under it.
nextbetread/writeAmount of the next bet.
previousbetread-onlyAmount of the bet that just settled.
balanceread-onlyCurrent balance, not counting vaulted funds.
winread-onlytrue if the last roll won.
currentstreakread-onlyWins in a row as a positive number, losses in a row as a negative one.
dobet()functionYour function. The engine calls it after every roll.
stop()functionEnds the run after the current roll.
vault(amount)functionMoves 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.

Browse all scripts

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.