NEXO DOCSv1 · ENES
docs / scripts / nexo-scratch

Nexo Scratch

Free scratch cards with real scratching, a 3D opening, 4 game modes and an in-game card designer.

v1.0.0ESXQBCoreQBoxStandalone

What's included

Scratch cards for FiveM with an in-game card designer, free. Works with ESX, QBCore, Qbox or no framework, with the most used inventories, and needs no database.

  • Real scratching with the mouse, with a coin as the cursor. Each cell reveals itself after scratching a percentage (configurable).
  • Animated 3D opening (spin, flip, slide or appear) with the card's back, mouse tilt, holographic reflection and a light sweep.
  • Particles while scratching, sound that changes with mouse speed and tiered celebrations (glow, confetti or a coin shower).
  • Character animation scratching with a coin or a key. Other players see it.
  • 4 game modes: match 3, find the symbol, winning numbers and instant. Multiplier cell (×2, ×5, ×10…) and bonus wheel.
  • Money, item and vehicle prizes, each with its own chance. The panel calculates the win chance, RTP and server profit, and can simulate 10,000 cards.
  • Event cards with start and end dates and a server-wide announcement, and points of sale with an NPC or a marker and a daily limit.
  • Security: the server decides the result when the card is opened, with an abuse detector, big-prize review and player blocking. Test mode, stats and history by serial number.
  • Discord logs, exports, dark or light theme, accent colour and 8 languages.

Card designer

Open it with /scratchadmin. Everything you change is saved in data/ and reaches players without a restart.

  • Design: templates, colours, texts, background image, silver, gold, holographic or custom foil, 3×3, 3×2, 4×3 or single-area cells, and snow.
  • Custom symbols: put your PNGs in web/symbols or use a link.
  • Auto-generated item image: when you publish a card, the script draws its image and saves it in your inventory's image folder.
  • Prizes and chances with the RTP calculation and the 10,000-card simulation, events with dates and points of sale.
  • Import and export designs with a code, test mode (opens cards for free, without paying prizes or counting in stats), stats and history.

It ships with 3 example cards: Lucky 7 (match 3 with a bonus wheel), Gold Rush (find the crown) and Jingle Jackpot (match 3 with a multiplier and snow).

Installation

  1. Copy the resource Get it for free from the store, download it from keymaster.fivem.net → Granted Assets and put nexo_scratch in resources.
  2. Add it to your server.cfg After your framework and inventory.
    ensure nexo_scratch
    add_ace group.admin nexoscratch.admin allow
  3. Add the items The 3 cards are scratch_lucky7, scratch_goldrush and scratch_xmas (see “Items”). If one is missing, the panel shows you the exact code for your inventory.
  4. Copy the images The 3 cards' images are in install/images/: copy them to your inventory's image folder. Cards you create in the panel generate their image automatically.

ESX/QBCore/Qbox groups (admin, superadmin, god) and the identifier list in config_server.lua also work.

Items

On QBCore (qb-inventory, ps, lj…) the script adds them automatically on start. For other inventories, create a usable item with that name. When you create a new card, pick its item in the Sale tab and the panel gives you the code.

['scratch_lucky7'] = { label = 'Lucky 7', weight = 10, stack = true, close = true },
['scratch_goldrush'] = { label = 'Gold Rush', weight = 10, stack = true, close = true },
['scratch_xmas'] = { label = 'Jingle Jackpot', weight = 10, stack = true, close = true },
-- standalone: add server = { export = 'nexo_scratch.useCard' } to each item

Commands

CommandWhoWhat it does
/scratchadminStaffOpens the designer
/scratchcardsEveryoneReopens a saved card and collects pending prizes
givecard <id> <tarjeta> [cantidad]Console / staffGives cards to a player

Saved cards: if a player closes a card halfway, they finish it later with /scratchcards. If they have no room for a prize, it's kept for them.

Configuration

`config.lua` (shared). Everything else is changed from /scratchadmin.

OptionWhat it does
Config.Locale · Config.Framework · Config.InventoryLanguage, framework and inventory (auto detects them)
Config.UI · Config.CurrencyPanel theme and colour, and currency symbol
Config.CommandsCommand names
Config.AccountsAccounts to charge cards and pay prizes (account, item or disabled)
Config.VehiclesGarage, type and plate length for vehicle prizes
Config.Interaction · Config.DefaultPointsNPC or marker, target or key, blip and initial points of sale
Config.ItemImagesGenerate each card's image and where to save it
Config.Sounds · Config.NotifyVolume and custom sounds (web/sounds), and notification system
Config.DefaultCardsCards created the first time

`config_server.lua` (server only): staff permissions (Ace, Groups, Identifiers), Discord webhook, security alerts webhook and the panel's request rate limit.

Exports and notes

exports.nexo_scratch:GiveCard(source, 'lucky7', 2)   -- give cards
exports.nexo_scratch:OpenCard(source, 'lucky7')      -- open a free card (rewards, events…)
exports.nexo_scratch:GetCards()                      -- card list
  • Vehicle prizes need oxmysql and your framework's tables (owned_vehicles or player_vehicles). In standalone, use the Money if it fails option.
  • Some inventories cache images: you may need to restart them to see new images.
  • Event dates use the server's time.

Editable files

FileWhat for
config.luaLanguage, framework, inventory, accounts, commands, points of sale, vehicles, images, sounds and starting cards.
config_server.luaStaff permissions and Discord webhooks.
bridge/Framework, inventory and vehicles.
locales/Texts in 8 languages.
web/symbols/ · web/sounds/Your own symbols and sounds.

FAQ

Can players cheat the result?

No. The server decides the result when the card is opened, with an abuse detector, big-prize review before paying and player blocking.

Can I create my own cards?

Yes. With /scratchadmin you design new cards (colours, foil, cells, symbols and prizes) and the script generates the item image for you.

Is the code encrypted?

The core is protected with Cfx.re escrow. Config, translations and integration points stay open.

Do I get updates?

Yes, for free. New versions appear in your Keymaster and we announce them on Discord.

What if something doesn't work?

Open a ticket on our Discord with the console error and we'll help you.