CoreShun Codes Redemption System
Codes that just work. Drop in. Configure once. Ship.
Overview
A complete code redemption system for Roblox games. Players redeem codes via a clean modal UI. Admins create, edit, and track codes from a live in-game dashboard — no Studio editing, no script restarts, no DataStore Editor.
Built with the same architecture and design language as my Admin Dashboard and Anti-Exploit Suite. Open source, fully readable Luau, no obfuscation.
Features
5 Reward Types
- Cash — adds to your leaderstats currency (Cash/Coins/Money or custom)
- Gamepass — calls your gamepass grant hook via
_G.CoreShunCodes_OnGamepassGrant - Item — calls your inventory hook via
_G.CoreShunCodes_OnItemGrant - Badge — awards via Roblox BadgeService:AwardBadge
- Custom — register your own handler in
Config.RewardHandlers
Stack Multiple Rewards Per Code
One code can grant cash, a gamepass, an item, AND a badge — all in a single redemption. Just chain reward types with commas:
Code:
Cash:5000, Gamepass:12345, Item:Sword:1, Badge:9876
Reward type names are case-insensitive. Whitespace is auto-trimmed. All rewards apply atomically.
Live Admin Dashboard
- Codes — view all codes, redemption counts, enable/disable, delete
- Create — make a new code with rewards, expiry, max uses
- Logs — full redemption log by date (success + failure reasons)
- Open with F4 hotkey or chat command /codesadmin
- Codes go live across all servers immediately — no restart needed
- Auto-refresh on live redemptions
Player UI — Three Ways to Open
- Hotkey — press
M(configurable) - Chat command — type
/redeemor/code - Floating button — persistent pill-shaped button in any corner
- Programmatic — call
_G.CoreShunCodes_OpenRedeemUI()from your own UI
Persistent By Default
Three DataStores. Auto-flushed every 30 seconds and on shutdown via BindToClose.
- Codes store — all code definitions (live across servers)
- Redemptions store — per-player redemption history (prevents double-redeem)
- Logs store — daily audit logs (up to 1000 entries per day)
Code Configuration Per Entry
- Enabled — toggle on/off without deleting
- Max redemptions — total cap across all players (0 = unlimited)
- Expires at — Unix timestamp for auto-expiry (0 = never)
- Description — admin-only helper text
- Rewards — any combination of the 5 reward types
Built-In Protections
- Per-account tracking — players can't redeem the same code twice
- Rate limited — 5 attempts per minute per player (configurable)
- Server-authoritative — codes and rewards never sent to client
- Case-insensitive matching — players don't have to worry about CAPS
Easy Installation
- Drop the .rbxmx into Studio — auto-places into ServerScriptService and StarterPlayerScripts
- Add your UserId to
Config.Adminsto access the dashboard - Wire your currency / item hooks (optional)
- Press M in-game to redeem, F4 to manage
What's Included
- CodesConfig.lua — single source of truth for codes, admins, reward handlers, UI theme
- CodesServer.lua — main redemption engine with DataStore persistence + admin remotes
- CodesClient.lua — lightweight client bootstrap (mounts UI + admin panel)
- CodesUI.lua — player-facing redeem modal with hotkey + chat + floating button
- CodesAdminPanel.lua — full 3-tab admin dashboard
- README.txt — full installation + usage docs
- CHEATSHEET.txt — quick reference for common tasks
- Cheatsheet.pdf — visual quick-reference (matches listing aesthetic)
- Manual.pdf — comprehensive 8-section reference
Frequently Asked
Can I create codes without restarting the server?
Yes. The admin dashboard creates codes live. They're saved to DataStore immediately and become available to all servers.
Can I add my own reward type?
Yes. Register a handler in
Config.RewardHandlers with any name (e.g. XP, Tickets, Diamonds). The admin form supports any custom type.How does it integrate with my existing currency system?
The default Cash handler reads from
leaderstats.Cash/Coins/Money. If your game uses a different name, edit Config.RewardHandlers.Cash in one place — that's it.Can players redeem the same code on alts?
Tracking is per UserId, so different accounts CAN redeem the same code. This matches industry-standard behavior. For stronger anti-farming, integrate with the CoreShun Anti-Exploit Suite.
Are there rate limits?
Yes — 5 redemption attempts per minute per player, configurable via
Config.General.MaxRedeemAttemptsPerMin.How are codes stored?
In a single DataStore key
all_codes with a _seeded flag. Admins can delete default codes without them coming back on restart.Support
Discord: https://discord.com/invite/hdB5tadkk8
Open source. Fully readable Luau. No obfuscation. Modify freely.
