gta6/prompts
casino
Vaultbeginnercasino

Instant Scratch Cards

ESX/QBCore/QBox buyable scratch-card item with a scratch-to-reveal UI and server-weighted tiered instant prizes.

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
~80 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A working scratch-card system: players buy a scratchcard inventory item, use it to trigger a scratch-to-reveal animation and UI, and the server rolls a weighted prize tier that pays out instantly. It is the cheap, broad-reach impulse item a roleplay server stocks at every store to soak up loose cash with minimal build effort.

Prompt Template

You are writing a FiveM resource for esextended (stable, exports 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

The reference Lua lives at content/expected-outputs/casino/09-instant-scratch-cards.lua. It registers the usable item, plays a loaded scratch anim on the client, and has the server re-validate the…

πŸ”’ 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

  • Client-rolled prize β€” Claude draws the tier and pays client-side; a modder forces the top tier. Keep the weighted draw and addMoney server-side only.
  • Anim before load β€” TaskPlayAnim no-ops if the dict is not loaded; always RequestAnimDict + while not HasAnimDictLoaded(dict) do Wait(0) end.
  • Item not consumed β€” revealing without removeInventoryItem lets one card scratch forever; verify count and remove the card on the server before drawing.

Corrective re-prompt: The card currently rolls its prize on the client and never gets consumed. Move the weighted tier draw and addMoney into server.lua, and on scratch:reveal re-check the inventory count and removeInventoryItem('scratchcard', 1) before drawing.

Framework Integration

  • ESX: ESX.RegisterUsableItem('scratchcard', ...), xPlayer.getInventoryItem / removeInventoryItem, addMoney for the prize.
  • QBCore: QBCore.Functions.CreateUseableItem('scratchcard', ...), Player.Functions.GetItemByName / RemoveItem, AddMoney('cash', prize).
  • QBox: register via exports.qbx_core + ox_inventory usable hook; ox_inventory:RemoveItem and the qbx money export for the payout.

Profit Potential

$150–$1800/mo on Tebex (expected ~$450). [INFERRED] priced inside the $50-389 FiveM script band against a stable impulse-item niche; corpus median seller $11.85K/mo (signal-scraper tebex_snapshot n=100).

Trend Signal

β†’ stable β€” inferred: Domain: cheap impulse item, trivial to ship, broad reach.

Sales Angle

Position as the impulse-buy money-sink that sells itself at the corner store β€” a usable scratch-card item with a server-rolled prize ladder. Recommended Tebex price $49.

Difficulty & Ship Time

beginner Β· ships in 2-4h.