Skip to main content
Players activate premium with the Upgrade Pass button in the UI, entering a transaction or redeem ID. There are two redemption modes, chosen with Config.Tebex.Enabled. Set Config.Tebex.Enabled = true. The player’s real Tebex transaction ID is verified against the Tebex Plugin API, and each transaction can only be redeemed once.
Config.Tebex = {
    Enabled = true,         -- verify against Tebex instead of local codes
    RequireComplete = true, -- only accept payments whose status is Complete/paid
    PackageIds = {7352503}, -- optional allow-list of package IDs ({} = any package)
}
OptionWhat it doesDefault
Config.Tebex.Enabledtrue validates Tebex transactionstrue
Config.Tebex.RequireCompleteOnly accept payments whose status is Complete/paidtrue
Config.Tebex.PackageIdsAllow-list of Tebex package IDs that grant premium. {} accepts any package.{7352503}

The Tebex secret key

The secret key is read automatically from the sv_tebexSecret convar that Tebex sets when you link your server in the Tebex panel — so in most cases you don’t configure anything. To set it manually instead, use ServerConfig.TebexSecret in server/sv_config.lua:
-- server/sv_config.lua  (server-only, never sent to clients)
ServerConfig.TebexSecret = '' -- leave empty to use the sv_tebexSecret convar
Never put the Tebex secret in shared/config.lua — that file also runs on every client. The secret belongs only in the sv_tebexSecret convar or server/sv_config.lua.
If Tebex is enabled but no secret is found, the resource logs: Tebex is enabled but no secret found — set the sv_tebexSecret convar (auto-set when you link Tebex) or ServerConfig.TebexSecret in server/sv_config.lua. Redemptions will fail until a secret is provided.

Mode 2 — Redemption codes

Set Config.Tebex.Enabled = false. The Transaction ID field then validates against single-use codes that you pre-seed in the nex_battlepass_codes table. Add codes to the table, for example:
INSERT INTO nex_battlepass_codes (code) VALUES ('ABCD-1234-EFGH-5678');
Players enter the code in the Upgrade Pass dialog. Each code is single-use.

Premium expiration

Whether and when premium expires is controlled by these options in shared/config.lua:
OptionWhat it doesDefault
Config.EnablePremiumExpirationfalse means premium never expires once grantedtrue
Config.PremiumExpirationType'duration' = X days from activation, 'fixed' = a specific day of each month'duration'
Config.PremiumExpirationDayIn 'duration' mode: number of days. In 'fixed' mode: day-of-month (1-28) it expires on.1
Config.ResetXpOnExpirationtrue wipes the player’s XP / level / claimed rewards when premium expiresfalse

Examples

  • 30-day premium from activation: PremiumExpirationType = 'duration', PremiumExpirationDay = 30.
  • Expires on the 1st of every month (seasonal): PremiumExpirationType = 'fixed', PremiumExpirationDay = 1.
  • Never expires: EnablePremiumExpiration = false.

Admin control

Admins can manage premium directly:
  • /setpremium [id] [0|1] — enable or disable a player’s premium
  • /extendpremium [id] — extend a player’s premium duration
Both require the group.admin ace. See Commands.