[Free] LXR-PromoCode | One-Time Promo Code Redemption System [All Frameworks]

[Free] LXR-PromoCode | One-Time Promo Code Redemption System [All Frameworks]

LXR-PromoCode

One-time promo code redemption system with full SQL persistence for RedM.

Give out promo codes for streamer events, community giveaways, welcome bonuses, or seasonal promotions. Every code is redeemed once per player β€” permanently tracked in the database across restarts.

Store: https://www.lxrcore.com
Discord: discord.gg/CrKcWdfd3A
Documentation: Included in the resource (docs/ folder)


Preview

(Coming Soon)


Features

  • SQL-persistent redemptions β€” claims survive server restarts permanently. No file-based storage, no JSON, no data loss.
  • One redemption per player per code β€” enforced by a 5-layer anti-exploit guard system (memory cache β†’ cooldown lock β†’ DB SELECT β†’ INSERT IGNORE β†’ UNIQUE constraint)
  • Global use limits β€” optionally cap total redemptions per code (e.g. first 50 players only)
  • Enable/disable codes on the fly β€” toggle codes in config without removing them
  • Configurable rewards β€” set custom dollar amounts per code
  • Discord webhook logging β€” every redemption logged with player name, identifier, code, and reward amount
  • Multi-framework support β€” auto-detects your framework or set it manually
  • Localization ready β€” ships with English and Georgian locale files, easy to add your own
  • Auto table creation β€” the SQL table is created on first boot, no manual import required
  • Resource name enforcement β€” escrow-protected guard prevents folder renaming exploits
  • 0.00ms idle β€” server-authoritative command handler, no tick loops, no polling, zero idle performance cost
  • Lua 5.4 β€” modern Lua with lua54 'yes'

Supported Frameworks

Framework Status
LXR-Core :white_check_mark: Full support
RSG-Core :white_check_mark: Full support
VORP Core :white_check_mark: Full support
RedEM:RP :white_check_mark: Supported
QBR-Core :white_check_mark: Supported
QR-Core :white_check_mark: Supported
Standalone :white_check_mark: License identifier fallback

Auto-detection order: LXR β†’ RSG β†’ VORP β†’ RedEM:RP β†’ QBR β†’ QR β†’ Standalone. First found wins. Override manually in config.lua if needed.


How It Works

  1. Define promo codes in config.lua with reward amounts, enabled state, and optional global use limits
  2. Players type /redeem CODE in chat
  3. Server validates the code through 5 layers of protection before granting the reward
  4. Redemption is permanently stored in MySQL β€” code cannot be reused by that player, ever

Anti-Exploit: 5-Layer Guard System

Every redemption passes through all five layers before money is awarded:

  1. DatabaseReady flag β€” blocks all commands until SQL cache is fully loaded on boot
  2. Per-player cooldown lock β€” prevents rapid command spam and race conditions
  3. In-memory cache check β€” fast-path rejection, no DB query needed for repeat attempts
  4. Direct SQL SELECT β€” catches stale cache edge cases after restarts
  5. INSERT IGNORE + UNIQUE constraint β€” database-level final wall, mathematically impossible to bypass

If the money add fails after DB insert, the row is rolled back automatically.


Installation

  1. Place lxr-promocode in your resources folder β€” folder name must be exactly lxr-promocode
  2. Add to server.cfg:
ensure oxmysql
ensure lxr-promocode
  1. Edit config.lua β€” add your promo codes, set framework, optionally add Discord webhook
  2. Start/restart the server β€” SQL table is created automatically

Configuration Example

Config.PromoCodes = {
    {
        code    = 'WELCOME100',
        reward  = 100,
        enabled = true,
        maxUses = 0,         -- 0 = unlimited (still 1 per player)
    },
    {
        code    = 'STREAMER500',
        reward  = 500,
        enabled = true,
        maxUses = 50,        -- first 50 players only
    },
}

Dependencies

  • oxmysql (required)
  • Any supported framework listed above (or standalone)

Accessible Files (Escrow)

This resource uses the Asset Escrow system. The following files are not escrowed and fully accessible to buyers:

  • config.lua β€” all configuration
  • fxmanifest.lua β€” resource manifest
  • README.md β€” documentation
  • docs/** β€” full documentation (install guide, config reference, framework compatibility, events, troubleshooting, changelog)
  • locales/** β€” English and Georgian locale files
  • sql/** β€” manual SQL import file

Core logic files (server/server.lua, client/client.lua, shared/framework.lua) are escrow-protected.


Store

Purchase on Tebex


Support

Join the Discord for setup help and support:
discord.gg/CrKcWdfd3A


Code is accessible Partly (config, locales, docs, SQL)
Subscription-based No
Lines (approximately) ~920
Requirements & dependencies oxmysql
Support Yes
3 Likes

Hello.
It is not working with vorp.
SCRIPT ERROR: No such export getUser in resource vorp_core

Contacted you on your discord. But no reply.

oh hi, I will update right now. Sorry about can’t reach me. lately i m active in redm roleplay discord server as i m working on that project.

In the script, all my contacts should be there as well.

:wolf: LXR-PromoCode β€” Changelog


[1.1.0] β€” 2026-03-17

Added

  • Anti-Farm Protection (Config.OneClaimPerPlayer) β€” when enabled, a player can only redeem one promo code across all codes. Once they use any code, every other code is permanently locked for that player. Ideal for streamer codes where you want one redemption per player, period.
  • Multi-Locale System (Config.Locale) β€” messages are now loaded from locale files at startup. Set Config.Locale = 'en' (or any locale code) and all messages auto-populate. Individual messages can still be overridden in Config.Messages.
  • 8 new locale files β€” Spanish (es), French (fr), German (de), Russian (ru), Portuguese (pt), Turkish (tr), Chinese Simplified (zh), Japanese (ja). Total: 10 languages.
  • AlreadyClaimedOne message β€” new notification shown when OneClaimPerPlayer blocks a player from using a second code. Added to all 10 locale files.
  • 7-layer anti-exploit guard system (upgraded from 5) β€” added Guard 3 (OneClaimPerPlayer in-memory cache) and Guard 5 (OneClaimPerPlayer DB check) to the existing guard chain.

Fixed

  • VORP Core integration β€” fixed SCRIPT ERROR: No such export getUser in resource vorp_core. The VORP detection now uses TryGetCore('vorp_core') which calls exports.vorp_core:GetCore() to obtain the actual core object, consistent with how all other frameworks are detected.

Changed

  • Default language set to English β€” Config.Locale = 'en' is now the default for global compatibility. Georgian remains available as 'ka'.
  • Locale load order β€” locale files now load before config.lua in fxmanifest.lua, enabling the automatic locale merger in config.
  • README.md β€” fully rewritten with enterprise-grade formatting, shields.io badges, security architecture diagram, and comprehensive feature documentation.
  • CONFIG.md β€” expanded with Config.Locale, Config.OneClaimPerPlayer, and updated message reference.

[1.0.1] β€” 2026-03-13

Added

  • sql/install.sql β€” standalone MariaDB-compatible schema file for manual import via HeidiSQL, phpMyAdmin, or the MariaDB console. The resource still auto-creates the table on first start; this file is optional.
  • TROUBLESHOOTING.md β€” new section explaining SQL Error 1064 caused by ? placeholders when queries are pasted directly into a SQL client, including correct manual-query examples with real values.
  • INSTALL.md β€” new Optional: Manual SQL Import subsection with step-by-step instructions for HeidiSQL, phpMyAdmin, and the MariaDB console.

[1.0.0] β€” 2026-03-13

Added

  • SQL-persistent one-time redemption β€” claims survive server restarts forever.
    lxr_promocode_redemptions table auto-created with UNIQUE KEY (code, identifier).
  • 5-layer anti-exploit guard system:
    • Guard 1: DatabaseReady flag blocks all commands until SQL is loaded
    • Guard 2: Per-player CooldownLock prevents rapid command spam / race conditions
    • Guard 3: In-memory cache fast-path rejection
    • Guard 4: Direct SQL SELECT check catches stale cache after restart
    • Guard 5: INSERT IGNORE + UNIQUE constraint β€” database-level final wall
  • Multi-framework bridge β€” LXR-Core, RSG-Core, VORP, RedEM:RP, QBR-Core, QR-Core, Standalone
  • Server-side resource name protection β€” lives in escrow-protected server/server.lua
  • Discord webhook logging β€” optional; logs every successful redemption
  • Per-code configuration β€” enabled, maxUses (global cap), reward
  • Locales β€” Georgian (ka) and English (en) provided
  • Full documentation β€” INSTALL, CONFIG, FRAMEWORKS, EVENTS, TROUBLESHOOTING
  • Tebex escrow compliance β€” public surface limited to config.lua, fxmanifest.lua, README.md, docs/**, locales/**

Updated version. please if any issue lets me know. thank you guys to showing so much love for this script. i do appreciate you all .

:wolf: Other RedM Scripts Made By Me

Built by **iBoss21 / The Lux Empire** for serious RedM roleplay servers.

  • **LXR PlayerStore β€” Premium player-owned shop system**
    Advanced player-owned shops, staff roles, buy orders, shop wallets, stock control, and business economy management.
    https://lxrcore.com/package/7437800

  • **LXR Balloons β€” Premium RedM balloon ownership**
    Ownable balloons, broker NPCs, persistent fleet, NUI shop, flight, passengers, repair, retrieval, and transfer system.
    https://lxrcore.com/package/7451150

  • **LXR-Flags β€” Standalone RedM Flag System**
    Carry, place, pick up, and manage immersive flags with a polished RedM flag system.
    https://lxrcore.com/package/7465444

  • **LXR-Music β€” YouTube Music Roleplay System for RedM**
    Play YouTube, SoundCloud, or direct audio links through in-game instruments and props with spatial roleplay audio.
    https://lxrcore.com/package/7361827

  • **LXR Discord β€” Nickname Sync**
    Automatically sync RedM character names with Discord server nicknames using a secure server-side bot system.
    https://lxrcore.com/package/7385502

  • **LXR-Proploot**
    Multi-framework prop looting system with cooldowns, loot tables, animations, security checks, and configurable rewards.
    https://lxrcore.com/package/7383578

  • **LXR Parasol**
    Usable parasol prop system with movement animation, item validation, multi-framework support, and immersive RedM behavior.
    https://lxrcore.com/package/7381702

  • **LXR Water & Swim Fix**
    Fixes broken RedM swimming, boat damage behavior, and water boundary issues with lightweight plug-and-play logic.
    https://lxrcore.com/package/7261354

  • **LXR-PromoCode β€” Promo Code Redemption System**
    Free SQL-persistent promo code system for rewards, giveaways, streamer codes, events, and new-player bonuses.
    https://lxrcore.com/package/7334163

Store

https://lxrcore.com/#cat-redm