Browse docs
Custom Rewards
Overview
Battle Pass can send custom level, premium, and randomized rewards to Functions.GiveCustomReward inside sky_base/config/sv_functions.lua.
Use this hook for rewards that are not handled by the default item, money, weapon, coin, or vehicle integrations.
Reward Structure
Every custom reward uses the same reward table structure:
{
label = "Pet Dog",
sort = "pet",
name = "dog",
amount = 1,
img = "dog.png"
}
| Key | Description |
|---|---|
label | Display name shown to the player. |
sort | Custom reward type. Use this value in GiveCustomReward to decide what should happen. |
name | Internal reward name, item name, vehicle model, pet id, or any identifier your integration needs. |
amount | Amount to give. |
img | Image used in the UI or configurator. |
Server Hook
Add your custom delivery logic in sky_base/config/sv_functions.lua:
sky_base/config/sv_functions.lua
function Functions.GiveCustomReward(source, reward)
if reward.sort == "pet" then
exports["some_petscript"]:GivePet(source, reward.name, reward.amount)
return
end
if reward.sort == "crate" then
exports["some_crate_script"]:GiveCrate(source, reward.name, reward.amount)
return
end
end
Keep custom reward logic server-side. The
source argument is the player receiving the reward.Config Example
Create a Battle Pass reward with the same sort value:
{
label = "Premium Pet",
sort = "pet",
name = "premium_pet",
amount = 1,
img = "premium_pet.png"
}
The
sort value in the reward config must match the value you check in Functions.GiveCustomReward.