Premium Pass
Giving Premium Battle Pass to Playersβ
The Sky-Systems Battle Pass offers premium rewards to players who purchase a premium Battle Pass. Here are three different ways to give premium Battle Pass to your players:
Direct Sale in UI
You can sell premium Battle Pass directly to players using the UI. This requires the sky_coinsystem to be installed on your server. Players can purchase coins and then use them to buy premium Battle Pass.
To enable this feature, set the following configuration options in your Battle Pass script:
premium = {
enabled = true,
price = 100,
},
enabled
determines whether players can purchase premium Battle Pass using coins. If you set enabled
to true
, the Battle Pass UI will display an option for players to purchase premium Battle Pass using coins.
price
determines the amount of coins required to purchase premium Battle Pass.
2. Sell Premium in Tebex Storeβ
You can also sell premium Battle Pass in your Tebex store. This allows players to purchase premium Battle Pass directly using real-world currency.
To enable this feature, set the following configuration options in your Battle Pass script:
premium = {
enabled = false,
price = 0,
tebex = {
enabled = true,
packageId = 0,
},
},
enabled
should be set to false
to disable the direct sale option. tebex.enabled should be set to true
to enable the Tebex store option.
packageId should be set to the ID of the Tebex package containing the premium Battle Pass. You can find the ID by going into the Tebex package and copying the ID from the URL. For example, if the URL of the package is https://sky-battlepass.tebex.io/package/5567774
, the packageId
is 5567774
.
Note that this option requires sv_tebexSecret
to be set in your server.cfg
.
Sell Premium in Tebex Store
You can also sell premium Battle Pass in your Tebex store. This allows players to purchase premium Battle Pass directly using real-world currency.
To enable this feature, set the following configuration options in your Battle Pass script:
premium = {
enabled = false,
price = 0,
tebex = {
enabled = true,
packageId = 0,
},
},
enabled
should be set to false
to disable the direct sale option. tebex.enabled
should be set to true
to enable the Tebex store option.
packageId
should be set to the ID of the Tebex package containing the premium Battle Pass. You can find the ID by going into the Tebex package and copying the ID from the URL. For example, if the URL of the package is https://sky-battlepass.tebex.io/package/5567774
, the packageId
is 5567774
.
Note that this option requires sv_tebexSecret
to be set in your server.cfg
.
Using Export Function or Command
You can give premium Battle Pass to players using the export function or command in one of your scripts.
For example, you can use the following command in your server console:
/givepremium [playerId]
Replace [playerId]
with the player's server ID.
You can also use the following export functions in one of your scripts:
-- @src : number : player server id
local hasPremium = exports['sky_battlepass']:HasPremium(src)
-- return : boolean : has the player the premium battlepass
-- @src : number : player server id
local worked = exports['sky_battlepass']:GivePremium(src)
-- return : boolean : true if everything worked fine
-- @src : number : player server id
local worked = exports['sky_battlepass']:RemovePremium(src)
-- return : boolean : true if everything worked fine
HasPremium(src)
checks whether a player has premium Battle Pass.
GivePremium(src)
gives premium Battle Pass to a player.
RemovePremium(src)
removes premium Battle Pass from a player.