CodeVault is a module used to handle redeemable codes for various purposes, such in-game rewards. It uses Roblox’s DataStoreService to persist code data between sessions.
You can aswell set a reedem limit, expiration time, and more automatically!
CODE EXAMPLE
local CodeVault = require(game.ServerScriptService.CodeVault)
local vault = CodeVault.new()
vault:GenerateCode("SPECIALCODE", 5, tick() + 86400)
local success, message = vault:RedeemCode(plr, "SPECIALCODE")
print(message)