Ares Scratchers - Installation & Configuration Guide
Version: 1.0.0 Author: Roroleroh Framework Support: ESX, QB-Core, QBX
📋 Table of Contents
Overview
Installation
Dependencies
Creating Scratchers
Configuration Guide
Adding Custom Scratchers
Item Configuration
🎯 Overview
Ares Scratchers is a modular scratch card system that allows players to purchase and scratch lottery tickets for prizes. Features include:
Visual scratch mechanics - Interactive scratch card UI with realistic effects
Customizable prizes - Configure win chances, cash rewards, and item rewards
Prize pools - Weighted probability system for balanced gameplay
Web-based builder - Create and export scratchers using visual tools
Particle effects - Customizable visual feedback when scratching
Rate limiting - Per-player cooldowns to prevent abuse
Multi-framework support - Works with ESX, QB-Core, and QBX
🚀 Installation
⚠️ Important: Resource Name
The resource folder MUST be named exactly:
Do not rename the folder. The script will not work correctly with any other name.
Setup Steps
Extract the resource to your server's
resourcesfolderAdd to server.cfg:
Install dependencies (see Dependencies)
Create your first scratcher using the web builder
Restart your server
No database setup required - scratchers use JSON-based storage.
📦 Dependencies
Required
ox_lib- Core library for NUI/menu helpers
Framework (Choose One)
ESX (
es_extended)QB-Core (
qb-core)QBX Core (
qbx_core)
Optional
ox_targetorqb-target- Entity/zone targetingox_inventoryorqb-inventory- Enhanced inventory integration
The script automatically detects your framework and inventory system.
🎨 Creating Scratchers
Web-Based Scratcher Builder
Use the official Ares Scratchers builder to create custom scratchers visually:
🔗 https://scratchers-tools.ares-studio.net/
Builder Features
1. Upload Assets
Upload front and back images (PNG format)
Both images must have the same resolution
Recommended: 512x512px or 1024x1024px
2. Font Settings
Font Family - Choose from web-safe fonts
Font Size - Adjust prize text size (px)
Color - Set text color for prize reveal
Alignment - Left, Center, or Right alignment
Preview - Position text using live preview panel
3. Web Config Settings
Scratch Behavior:
Brush Size - Size of the scratch area (pixels)
Complete Threshold - Percentage scratched to auto-reveal (%)
Particle Effects:
Particle Count - Number of particles when scratching
Particle Lifetime - How long particles exist (ms)
Particle Gravity - Downward force on particles
Particle Size - Min/max size range (px)
Base Dimensions:
Automatically calculated from uploaded images
Used for proper UI scaling
4. Item Metadata
Item Name - Internal ID (lowercase, no spaces)
Display Label - Name shown in inventory
Description - Item description text
Weight - Item weight in grams
Stackable - Can players stack multiple?
5. Prize Pool
Add multiple prizes with win chances
Total must equal 100%
Reward types:
None (Lose) - No prize
Give Cash - Money to player's wallet
Give Bank Money - Money to player's bank
Give Dirty Money - Black money (ESX)
Give Item - Specific inventory item
6. Export
Click Export ZIP to download complete package
Package includes everything needed for installation
📥 Adding Custom Scratchers
Installation Process (3 Steps)
After exporting from the web builder, you'll receive a ZIP with this structure:
Step 1: Copy Backend Files (Server-Side)
Copy the contents of the backend/ folder to:
Result:
⚠️ IMPORTANT - Merging list.json:
If this is your FIRST scratcher:
Just copy the entire
backend/folderThe
list.jsonfile is already complete
If you ALREADY HAVE other scratchers:
DO NOT replace
list.jsonOpen your existing
list.jsonAdd the new entry to the
"scratchers"array:
Step 2: Copy Frontend Files (Client-Side)
Copy the contents of the frontend/ folder to:
Result:
Step 3: Register Item in Your Framework
Choose ONE of the following based on your framework. Ready-to-use snippets are in the _framework_configs/ folder.
Step 4: Restart Server
Execute in server console:
Or restart your entire server.
⚙️ Configuration Guide
All configuration is done in shared/config.lua.
Rate Limiter Settings
Enabled
boolean
Enable per-player rate limiting
true
MaxUses
number
Maximum scratchers before cooldown
3
CooldownSeconds
number
Cooldown duration in seconds
100
How it works:
Players can use up to
MaxUsesscratchersAfter reaching the limit, they must wait
CooldownSecondsPrevents spam and maintains server economy balance
Example - Tighter limits:
Disable rate limiting:
Animation Settings
EntryDuration
number
Entry animation duration (milliseconds)
500
BounceScale
number
Bounce overshoot multiplier
1.05
ExitDuration
number
Exit animation duration (milliseconds)
300
Description: Controls the timing and feel of the scratcher UI animations.
Slower animations:
Scratch Validation
Enabled
boolean
Enable minimum scratch time validation
true
MinimumTime
number
Minimum active scratch time (milliseconds)
2000
Description: Prevents instant auto-scratch exploits by requiring players to actively scratch for a minimum duration.
Example - Longer required scratch:
Disable validation (not recommended):
Notification Settings
UseFramework
boolean
Use framework's notification system
WinTitle
string
Title for win notifications
WinIcon
string
Font Awesome icon for notifications
LoseMessage
string
Message shown when player loses
Customization example:
Logging Settings
Enabled
boolean
Enable logging system
Console
boolean
Log to server console
Database
boolean
Log to database (requires oxmysql)
Discord
boolean
Send logs to Discord webhook
WebhookURL
string
Discord webhook URL
Discord webhook setup:
What gets logged:
Player identifier
Scratcher used
Prize won
Timestamp
Win/loss result
Debug Mode
Description: Enable detailed console logging for troubleshooting.
Production: Set to false to reduce console spam.
🎒 Item Configuration
Item Properties Explained
When creating scratchers, you'll configure these item properties:
name
string
Internal item ID (lowercase)
'golden_scratcher'
label
string
Display name in inventory
'Golden Scratcher'
weight
number
Item weight (grams)
100
stackable
boolean
Can players stack multiple?
true
useable
boolean
Can item be used?
true
description
string
Item description
'Win big prizes!'
Example Items by Rarity
Common Scratcher:
Rare Scratcher:
Limited Edition:
📝 Quick Reference
Essential Configuration Checklist
✅ Create scratcher using web builder
✅ Copy backend files to
scratchers/✅ Merge
list.jsonif needed✅ Copy frontend files to
html/scratchers/✅ Add item to your framework
✅ Configure rate limiter in
config.lua✅ Set
Config.Debug = falsein production✅ Test scratcher in-game
Performance Tips
Set
Config.Debug = falseon live serversUse reasonable particle counts (50-200)
Keep image resolutions consistent (512px or 1024px)
Enable rate limiting to prevent spam
Common Customizations
Disable cooldowns:
Faster animations:
Custom win messages:
🔧 Troubleshooting
Scratcher doesn't appear
Check list.json is properly merged
Images not loading
Verify file paths in config.json and data.json
Can't use scratcher
Ensure item is added to framework items
No prize awarded
Check prizes.json - total must equal 100%
Rate limit not working
Verify Config.Limiter.Enabled = true
Particles not showing
Check particle settings in scratcher config.json
🎯 Prize Pool Example
Balanced prize pool for a $100 scratcher:
Nothing
70%
$0
Small Prize
20%
$50
Medium Prize
8%
$200
Big Prize
1.9%
$1,000
Jackpot
0.1%
$10,000
Total: 100% Expected return: ~$60 per scratcher House edge: 40%
🌐 Web Builder Reference
Builder URL: https://scratchers-tools.ares-studio.net/
What you can configure:
✅ Visual appearance (images, fonts, colors)
✅ Scratch mechanics (brush size, threshold)
✅ Particle effects (count, lifetime, gravity)
✅ Prize pools (chances, rewards, items)
✅ Item metadata (name, weight, description)
What you get:
✅ Complete backend configuration
✅ Frontend UI files
✅ Framework item snippets
✅ Installation instructions
✅ Ready-to-use ZIP package
Support: For issues or questions, please contact Ares Studio. License: This script is protected and should not be redistributed without permission.
Last updated
Was this helpful?

