Skip to content
DiceSim

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.

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 a page with the full code, a step-by-step explanation and the streak math.

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 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.