/DOCS

The
runtime.

Everything that ships today — the extension, the script runtime, recovery strategies, and the Genie. Read top to bottom or jump via the table of contents.

SECTION01

Getting started

WeySabi //bet is a private browser-bot platform. You install a Chrome extension, open it on a supported casino tab, load a Lua/JS script (a built-in strategy or your own), and run it. The engine never touches the casino — it only stores your account and session state.

Three things to know

  • Free tier. Six recovery strategies, custom JS/Lua editing, Test mode, Live mode — all unlimited.
  • Pro tier unlocks 5 MartinChance variants. DM the admin on Telegram with your User ID + payment proof to upgrade.
  • Multi-site. Stake (all 7 mirrors) and Wolf.bet (dice) live today, each behind a CasinoAdapter.

Four-step flow

  1. Sign in with Telegram (one-tap widget or 6-digit OTP).
  2. Install the extension and paste your API token from /dashboard?section=profile.
  3. Pick a built-in strategy or write your own in Lua / JS.
  4. Run Test mode against simulated rounds, then flip to Live when you're confident.
SECTION02

Installing the extension

The extension ships as a Chrome MV3 build, sideloaded — no Chrome Web Store needed. Download the latest zip from your dashboard, unzip it, and load the folder unpacked.

>install.shjs
# 1. Download the zip from /dashboard?section=install
# 2. Unzip to a permanent folder (don't delete it after)
# 3. chrome://extensions → Developer mode → Load unpacked
#    → select the unzipped folder
# Optional — build from source instead:
ENGINE_URL="https://weysabi-bet-engine.glexdev.workers.dev" \
WEB_APP_URL="https://weysabi-bet-web.glexdev.workers.dev" \
pnpm -C extension build  # → extension/dist

Load it

  1. Open chrome://extensions.
  2. Toggle Developer Mode.
  3. Click Load Unpacked → pick extension/dist/.
  4. Pin it. Click the icon → side panel opens → paste your API token.
SECTION03

Strategies

Six recovery strategies ship free to every member. Five Pro MartinChance variants gate behind role: pro. Every strategy honours Profit Lock and STOP WIN — the runtime exits the moment either floor / target is hit.

Free seeds

  • Shadow Strike — threshold-based dip catcher.
  • Pivot Martingale — anti-martingale with reset on streak.
  • Streak Sniper — fires on N consecutive losses.
  • Tidewatch — sliding-window mean reversion.
  • Shield — defensive: cap stake at K% of bankroll.
  • Harmonics — fibonacci stake progression with cap.

Pro · MartinChance line

Five variants — base MartinChance, ZigZag, HighLow, Fibo, and Bounded — each with built-in recovery, configurable cycle caps, and Profit Lock integration. Unlock Pro by DMing the admin on Telegram with your User ID + payment proof; your role flips after manual verification.

Profit Lock

When the session profit clears the lock target, the runner switches to a base stake floor and refuses to scale up. Hard guardrail — survives strategy-defined nextbet writes.

>profit-lock.jsjs
// Set in the panel · per-script
config.profitLock = {
  target: 5.0,        // session profit (in basebet units)
  resetTo: basebet,   // stake to enforce after lock fires
};

STOP WIN

Hard target — when reached, the runner calls host.stop() and finalises the session. Useful for fixed-profit days. Combine with Profit Lock for layered safety.

SECTION04

Game support

Crash, Slide, Dice and Limbo at parity on Stake. Each game has a GameAdapter that normalises round events into { gameId, multiplier } for the runtime.

GAMEVARIABLESNOTES
CRASHmultiplier · cashoutAtCashout target writable per round.
SLIDEmultiplier · cashoutAtSame shape as Crash; engine handles different RNG.
DICEtarget · bethigh · rollInstant loop fixed in session 22 — no 10s pause between rounds.
LIMBOtarget · multiplierSame Crash-style dobet contract.

The bet-timing fix

Pre-session-19 the runner placed the next bet on the round-end event, which on Stake fires after the new round's pre-bet window has already partially elapsed. The fix: subscribe to the round-starting WS event and place from there with a bounded retry counter (max 3 consecutive place-bet failures stops the session — see session 23).

SECTION05

Custom scripts

Both Lua 5.3 (via fengari) and JavaScript are first-class. Your script defines a dobet() function — the runner calls it after every round settlement, passing in ScriptVars (40+ fields) and HostFunctions (log, sleep, stop, resetstats, etc).

JavaScript example

>double-on-loss.jsjs
// Classic martingale — double on loss, reset on win.
// Variables like nextbet, basebet, win, balance are predefined
// on the script context (sloppy mode + with(ctx)).

basebet = 0.0001;
nextbet = basebet;

function dobet() {
  if (win) {
    nextbet = basebet;        // reset on win
  } else {
    nextbet = previousbet * 2; // double on loss
  }
  if (nextbet > balance * 0.5) {
    log("stake exceeds half balance — stopping");
    stop();
  }
}

Lua example

>double-on-loss.lualua
-- Same idea, Lua 5.3.
basebet = 0.0001
nextbet = basebet

function dobet()
  if win then
    nextbet = basebet
  else
    nextbet = previousbet * 2
  end
  if nextbet > balance * 0.5 then
    log("stake exceeds half balance — stopping")
    stop()
  end
end
SECTION06

Script Genie · admin beta

The Genie generates Lua or JS bot scripts from natural-language prompts. Backed by Claude Sonnet 4.6 with a ~2000-token system prompt + 11 few-shot examples. Output is validated before return — no fetch, no eval, no cross-realm access.

>POST /genie/generatejs
// Admin-only feature.
fetch("/genie/generate", {
  method: "POST",
  headers: { "Authorization": "Bearer $ADMIN_JWT" },
  body: JSON.stringify({
    prompt:   "double on loss reset on win",
    language: "js",
    gameType: "crash"
  })
})
// → { script: "function dobet() { ... }",
//     usage: { inputTokens, outputTokens, cacheReadInputTokens } }

Output validation

  • Script must define function dobet().
  • 14 forbidden patterns blocked: fetch, eval, window, chrome., document, etc.
  • JS branches go through a syntax-check (AsyncFunction parse, no execution).
  • Refusal sentinels (REFUSE) and Sonnet refusal stop reasons surface as 422.
SECTION08

FAQ

Why isn't there a server-side WebSocket?

[+]
Stake.com (and likely peers) blocks Cloudflare egress IPs. Any casino traffic from our engine would be rate-limited or banned. All bet placement and round subscriptions run in the user's browser, from the user's residential IP.

Is my API token sensitive?

[+]
Yes. Anyone with it can act as you. Rotates every 24h automatically — re-paste a fresh one if the popup reports expired. Never commit it. Never paste in chat. We never log it.

What if my script throws?

[+]
The runner catches the throw, logs it with the round's ScriptVars, and stops the session. Status moves to error; click Reset (session 23 fix — before that the state stuck and only an extension reload cleared it).

Can I write my own scripts?

[+]
Yes. The editor takes any Lua 5.3 or JS script defining dobet(). Six free strategies ship built-in; Pro members also get the 5 MartinChance variants. You can save your own scripts to your library too.

When does Pro actually unlock?

[+]
DM the admin on Telegram with your User ID (Profile → User ID) + payment proof. After manual verification your role flips to Pro — log out and back in to refresh, and the Pro strategies appear.

What runs offline?

[+]
The extension's bot panel + script editor + Test mode (simulated crashpoint sampler). You only need engine connectivity for auth and saving scripts to your library.