gta6/prompts
casino
Vaultbeginnercasino

Coinflip Double-or-Nothing

ESX/QBCore/QBox peer-to-peer coinflip wager with both stakes escrowed server-side and an animated flip reveal.

NON-TESTÉ — the reference Lua is syntax-validated, not run in a live FiveM server. Adapt and test on your own dev server before shipping.
Est. Lua
~88 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A peer-to-peer double-or-nothing coinflip where one player challenges another, both stakes are escrowed server-side, and a single authoritative flip decides who takes the pot. Servers buy the paid version because the free clones leak money on disconnect and resolve the flip client-side.

Prompt Template

Write a FiveM peer-to-peer coinflip / double-or-nothing wager for ESX (exports['esextended']:getSharedObject()).

πŸ”’ Eyes-only β€” locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth β€” both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Expected Output

See content/expected-outputs/casino/20-coinflip-double-or-nothing.lua β€” the client sends a challenge and accept and plays the flip anim; the server escrows both stakes in a pending table, flips, and…

πŸ”’ Eyes-only β€” locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth β€” both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Only the challenger's stake escrowed, so the target can flake with no penalty.
  • Coin flipped on the client, letting a modded challenger always win.
  • One side missing AddEventHandler, so the accept never reaches the server.

Corrective re-prompt: "Escrow BOTH stakes server-side β€” remove the challenger's on challenge and the target's on accept, refunding the challenger if the target can't pay. Flip the coin only in the server accept handler and credit the full pot to the winner. Ensure every net event has both RegisterNetEvent and AddEventHandler on each side."

Framework Integration

  • ESX: xPlayer.removeMoney / addMoney plus getName() for the challenge prompt.
  • QBCore: QBCore.Functions.GetPlayer(src) with Player.Functions.RemoveMoney/AddMoney('cash', amount, 'coinflip').
  • QBox: same API surface through exports.qbx_core:GetPlayer(src).

Profit Potential

$80–$1200/mo on Tebex (expected ~$300). [INFERRED] priced inside the $50-389 FiveM script band against the signal-scraper tebex_snapshot corpus (median seller $11.85K/mo, n=100), scaled to a saturated-niche unit rate.

Trend Signal

β†˜ saturated β€” inferred: Domain: ubiquitous PvP wager, commodity mechanic (often bundled free).

Sales Angle

Beat the free clones on safety β€” escrowed stakes, disconnect-proof, server-side flip; recommended Tebex price $59.

Difficulty & Ship Time

beginner Β· ships in 1 day.