Skip to Content

Config

All Prism Scripts contain various editable and unobscured files containing, exports, client
and server functions, configuration methods and more.
config.lua
Config = {} Config.Framework = 'qbx' -- 'qbx' or 'qb' or 'esx' Config.Cooldown = 10 -- Seconds between scratch card uses Config.SessionTimeout = 120 -- Seconds before an unfinished session expires Config.MoneyType = 'cash' -- 'cash' or 'bank' Config.Tiers = { standard = { item = 'scratch_card', primaryColor = '#4CAF50', label = 'STANDARD', luckyNumberCount = 4, cellCount = 9, numberRange = {1, 50}, winChance = 0.08, prizes = { '$1','$1','$2','$2','$5','$5','$10','$10','$15','$20','$25','$50' }, }, premium = { item = 'scratch_card_premium', primaryColor = '#BEEE11', label = 'PREMIUM', luckyNumberCount = 4, cellCount = 9, numberRange = {1, 50}, winChance = 0.1, prizes = { '$5','$5','$10','$10','$15','$15','$20','$25','$50','$75','$100','$250','$500','$1000' }, }, vip = { item = 'scratch_card_vip', primaryColor = '#FFD700', label = 'VIP', luckyNumberCount = 5, cellCount = 9, numberRange = {1, 40}, winChance = 0.15, prizes = { '$50','$50','$100','$100','$250','$250','$500','$500','$1000','$2500','$5000' }, }, } Config.Translation = { confirmTitle = 'READY TO SCRATCH?', confirmBody = "Once you start scratching, there's no going back. Reveal all cells to claim your prize.", confirmButton = "LET'S GO", declineButton = 'Not now', cardSubtitle = 'SCRATCH CARD', luckyNumbers = 'Lucky Numbers', totalWon = 'Total Won', }

Config Options Explained

Framework

Set your server’s framework. Supported values:

  • 'qbx' — QBX Core (new QBCore)
  • 'qb' — QBCore
  • 'esx' — ESX Legacy

General Settings

OptionTypeDefaultDescription
Cooldownnumber10Seconds a player must wait between scratch card uses
SessionTimeoutnumber120Seconds before an unfinished scratch session expires and is cleaned up
MoneyTypestring'cash'Where winnings are paid — 'cash' or 'bank'

Tier System

Each tier defines a scratch card type with its own item, appearance, odds, and prizes. You can add, remove, or modify tiers.

OptionDescription
itemThe inventory item name that triggers this tier
primaryColorHex color used for the scratch card UI theme
labelDisplay name shown on the scratch card
luckyNumberCountHow many lucky numbers are drawn (more = higher chance of matching)
cellCountTotal number of scratch cells (always 9 for a 3x3 grid)
numberRangeMin and max range for generated numbers (e.g., {1, 50})
winChanceProbability per cell to be a winner (0.08 = 8%, 0.10 = 10%, 0.15 = 15%)
prizesPool of prize values randomly assigned to winning cells

Default Tiers

TierItemColorLucky NumbersNumber RangeWin ChancePrize Range
Standardscratch_cardGreen41–508%$1 – $50
Premiumscratch_card_premiumYellow41–5010%$5 – $1,000
VIPscratch_card_vipGold51–4015%$50 – $5,000

Translations

All UI text is configurable via Config.Translation. Modify these values to localize the scratch card interface to your server’s language.

KeyDefaultDescription
confirmTitle'READY TO SCRATCH?'Title on the confirmation modal
confirmBody"Once you start scratching..."Body text on the confirmation modal
confirmButton"LET'S GO"Primary button text
declineButton'Not now'Cancel button text
cardSubtitle'SCRATCH CARD'Subtitle displayed on the card
luckyNumbers'Lucky Numbers'Label for the lucky numbers section
totalWon'Total Won'Label for the total winnings display
Last updated on