I welcome you CFX community!
Today I present you the Battle Pass system! Battle Pass is a game event during which, by completing tasks, you receive rewards (You can configure up to what date the pass will work). Iโm sure you and your players will love it!
The pass is divided into two types: Free and Premium. There are 100 levels in total (You can do more), each paid and free level is configurable. Up to 4 rewards can be set in a level cell.
To pump the level, you can buy it for currency, you can also perform tasks that are very easy to configure, and you can also use exports that will help you implement adding / taking away the level and experience from players. Every 1000 experience will give you 1 level.
Demonstration of the system:
Preview Video
Example of a configuration file:
Configuration files
-- /*
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโฆโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
-- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ*/
Config = {}
Config.myFramework = 'esx' --Defining the framework like esx/qb/standalone.
Config.useInventory = true --Do you want to use a inventory system?
Config.myInventory = 'ox_inventory' --Inventory definition like ox_inventory/qb-inventory/esx. (Custom ones can be added to the Config.storageSetup and bridge file).
Config.PassPrice1 = 1000
Config.PassPrice2 = 5000
Config.PassPrice3 = 20000
Config.GiftPassPrice = 1000
Config.LvlPrice = {900,1500,2700}
Config.EndPassDate = "2030-12-30" -- If the date < the current date, then battlepacks will not open!
Config.useCommandNameOpenMenu = true
Config.commandNameOpenMenu = 'battlepass'
Config.keyMappingOpenMenuText = 'Open battlepass'
Config.keyMappingOpenMenu = 'f10'
Config.getExpEveryNTime = false
Config.expEveryNTime = 10
Config.expTime = 60000 -- 1 min in msc
---------------------------------Translation
Config.Translation1 = "Days until the end of the pass: "
Config.Translation2 = "Battle pass"
Config.Translation3 = "Quests"
Config.Translation4 = "Buy as a gift"
Config.Translation5 = "Your ID: "
Config.Translation6 = "Send"
Config.Translation7 = "Gift Price: $"
Config.Translation8 = "Standard pass"
Config.Translation9 = "Nothing superfluous, it will just open up premium pass options"
Config.Translation10 = "Buy for $"
Config.Translation11 = "Extended Pass"
Config.Translation12 = "Includes a Standard pass and 20 levels to it"
Config.Translation13 = "Royal Pass"
Config.Translation14 = "Includes a Standard Pass and 100 levels to it"
Config.Translation15 = "Buy pass levels!"
Config.Translation16 = "More levels - more chances to find rare rewards"
Config.Translation17 = "Set"
Config.Translation18 = "Price"
Config.Translation19 = "Quantity"
Config.Translation20 = "Total levels"
Config.Translation21 = "Total price"
Config.Translation22 = "5 levels"
Config.Translation23 = "10 levels"
Config.Translation24 = "20 levels"
Config.Translation25 = "Buy"
Config.Translation26 = "Buy a pass"
Config.Translation27 = "Buy as a gift"
Config.Translation28 = "Buy levels"
Config.Translation29 = "Premium"
Config.Translation30 = "Free"
Config.Translation31 = "Meet the Battle Pass with exciting tasks and limited rewards that are already waiting for you and your friends!"
Config.Translation32 = "$"
---------------------------------CONFIG
Config.freelvls = { --Rewards that a player can get without a purchased battle pass
[1] = { --Cell
items = {
{
Name = "$500", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "10.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "money", --Type of reward ("money"/"item")
Reward = "500", --Reward
Category = "freelvls", --Subject category ("freelvls"/"premiumlvl")
Amount = nil, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
},
},
[3] = { --Cell
items = {
{
Name = "Orange", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "2.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "orange", --Reward
Category = "freelvls", --Subject category ("freelvls"/"premiumlvl")
Amount = 2, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
},
},
[5] = { --Cell
items = {
{
Name = "Rose", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "6.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "rose", --Reward
Category = "freelvls", --Subject category ("freelvls"/"premiumlvl")
Amount = 1, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
{
Name = "$1000", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "11.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "money", --Type of reward ("money"/"item")
Reward = "1000", --Reward
Category = "freelvls", --Subject category ("freelvls"/"premiumlvl")
Amount = nil, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
{
Name = "Letter", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "8.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "letter", --Reward
Category = "freelvls", --Subject category ("freelvls"/"premiumlvl")
Amount = 1, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
},
},
}
Config.premiumlvl = { --Rewards that a player can only get from a purchased battle pass
[1] = { --Cell
items = {
{
Name = "First aid kit", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "14.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "aidkit", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = 1, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
}
}
},
[2] = { --Cell
items = {
{
Name = "$1500", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "12.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "money", --Type of reward ("money"/"item")
Reward = "1500", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = nil, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
{
Name = "Bong", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "7.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "bong", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = 1, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
{
Name = "Orange", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "2.png",--The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "orange", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = 10, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
{
Name = "$1500", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "12.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "money", --Type of reward ("money"/"item")
Reward = "1500", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = nil, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
}
},
[4] = { --Cell
items = {
{
Name = "Bag", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "1.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "bag", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = 1, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
}
}
},
[6] = { --Cell
items = {
{
Name = "$1000", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "11.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "money", --Type of reward ("money"/"item")
Reward = "1000", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = nil, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
{
Name = "Donut", --Cell name in UI
Taken = false, --The parameter of whether the reward is taken (It is better not to change if you are not sure)
Picture = "3.png", --The image of the item that is located on the path Burevestnik_battlepass\ui\img\items
Type = "item", --Type of reward ("money"/"item")
Reward = "donut", --Reward
Category = "premiumlvl", --Subject category ("freelvls"/"premiumlvl")
Amount = 5, --For money, the amount is set in Reward, this field must be nil. For items, the quantity is set in this field
},
}
}
}
Config.quests = { --Quests available in the battle pass
{
ID = 1, --The ID of the quest to which must be unique and which must be accessed during the use of the export
Name = "Quick lunch", --Name of the quest
Description = "Eat a burger", --Description of the quest
Progress = 0, --The current progress of the quest by the player. Starting position 0
Max = 4, --Maximum number of stages for a quest
Rewards = 300, --Reward
Complete = false --The parameter of whether the quest is completed (It is better not to change if you are not sure)
},
{
ID = 2, --The ID of the quest to which must be unique and which must be accessed during the use of the export
Name = "Connection", --Name of the quest
Description = "Buy a phone", --Description of the quest
Progress = 0, --The current progress of the quest by the player. Starting position 0
Max = 1, --Maximum number of stages for a quest
Rewards = 500, --Reward
Complete = false --The parameter of whether the quest is completed (It is better not to change if you are not sure)
},
{
ID = 3, --The ID of the quest to which must be unique and which must be accessed during the use of the export
Name = "First job", --Name of the quest
Description = "Find a job at an employment center", --Description of the quest
Progress = 0, --The current progress of the quest by the player. Starting position 0
Max = 1, --Maximum number of stages for a quest
Rewards = 1000, --Reward
Complete = false --The parameter of whether the quest is completed (It is better not to change if you are not sure)
},
}
--Event to open the menu
--TriggerEvent('Burevestnik_battlepass:openUI')
---------------------------------exports
-- exports.Burevestnik_battlepass:Burevestnik_battlepass_plusLevel(amount)
-- exports.Burevestnik_battlepass:Burevestnik_battlepass_plusExp(amount)
-- exports.Burevestnik_battlepass:Burevestnik_battlepass_minusLevel(amount)
-- exports.Burevestnik_battlepass:Burevestnik_battlepass_progQuest(id,amount)
Optimization (The script consumes):
0.00 ms in a quiet state.
0.01 ms in an active state.
What does this Battle pass system include:
-
This system works on all versions of ESX, QBCore, as well as STANDALONE!
-
Beautiful user interface!
-
The ability to buy a friend a battle pass!
-
Convenient exports!
-
Psd file for the logo included!
-
The ability to customize rewards!
-
The end of the pass by a certain date !
-
The ability to customize quests to complete!
-
Support for Burevestnik Quest system V3!
-
Incredibly customizable configuration file!
-
You can completely change the user interface at will!
-
Of course support, Iโm ready to help you!
You can get that resource in my Tebex.
TOP SALES
You may also be interested in my other resources:
Code is accessible | Open source: Yes \ Escrow: No - Available only: config, ui |
Subscription-based | No |
Lines (approximately) | ~2000 |
Requirements | Standalone/ESX/QBCore |
Support | Yes |