๐Ÿ”ฅ [PAID] [Standalone][ESX][QBCore] Battle pass system | UI | Rewards | Tasks | Burevestnik

bpLogo

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:

:movie_camera: Preview Video

Screenshots





Example of a configuration file:

Configuration files
-- /* 
-- โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ•—
-- โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–ˆโ–ˆโ•”โ•
-- โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•ฆโ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ•šโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•โ•โ–‘
-- โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ–‘โ–‘โ–‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–‘โ–ˆโ–ˆโ•”โ•โ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ•โ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•—โ–‘
-- โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•ฆโ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ•šโ–ˆโ–ˆโ•”โ•โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ•šโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ•šโ–ˆโ–ˆโ•—
-- โ•šโ•โ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ–‘โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•šโ•โ•โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•*/

Config = {}

-- Are you using ESX?
Config.UseESX = true
-- Enable this if ESX throws an error: Used the getSharedObject Event, this event no longer exists!
Config.UseESX_lib = false
-- Are you using QBCore?
Config.UseQBCore = false
-- Are you using QBCore?
Config.UseStandalone = false

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")
            },
        },
    },
    [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")
            },
        },
    },
    [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")
            },
            {
                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")
            },
            {
                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")
            },
        },
    },
}

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")
            }
        }
    },
    [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")
            },
            {
                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")
            },
            {
                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")
            },
            {
                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")
            },
        }
    },
    [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")
            }
        }
    },
    [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")
            },
            {
                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")
            },
        }
    }
}


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)
    },
}

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function buy(battlepassType)
    local yourFunction = yourFunction.GetPlayerId(source)
    if battlepassType == 0 then
        if yourFunction.getMoney() >= Config.PassPrice1 then
            yourFunction.removeMoney(Config.PassPrice1)
            MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1' WHERE owner ='"..identifier.."'")
        end
    elseif battlepassType == 1 then
        if yourFunction.getMoney() >= Config.PassPrice2 then
            yourFunction.removeMoney(Config.PassPrice2)
            MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1',`level` = `level`+ 20 + `level` WHERE owner ='"..identifier.."'")
        end
    elseif battlepassType == 2 then
        if yourFunction.getMoney() >= Config.PassPrice3 then
            yourFunction.removeMoney(Config.PassPrice3)
            MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1',`level` = `level`+ 100 + `level`  WHERE owner ='"..identifier.."'")
        end
    end
end

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function buyLvl(lvlAmount, amount)
    local yourFunction = yourFunction.GetPlayerId(source)
    if yourFunction.getMoney() >= amount then
        yourFunction.removeMoney(amount)
        MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `level` = `level`+'"..lvlAmount.."' WHERE owner ='"..identifier.."'")
    end
end

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function reward(battlepassRewardtype, battlepassReward)
    local yourFunction = yourFunction.GetPlayerId(source)
    if battlepassRewardtype == "money" then 
        yourFunction.addMoney(tonumber(battlepassReward))
    elseif battlepassRewardtype == "item" then 
        yourFunction.addInventoryItem(battlepassReward, 1)
    end
end

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function gift(giftID)
    local yourFunction = yourFunction.GetPlayerId(source)
    if yourFunction.getMoney() >= Config.GiftPassPrice then
        yourFunction.removeMoney(Config.GiftPassPrice)
        MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1' WHERE id ='"..giftID.."'")
    end
end


--Event to open the menu
--TriggerEvent('bur_nui_battlepass:open')

---------------------------------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_minusExp(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!

:shopping_cart: [OPEN SOURCE] You can get that resource in my Tebex.

:shopping_cart: [ESCROW] You can get that resource in my Tebex.

TOP SALES

qs3 hudsystem-min bpLogo

You may also be interested in my other resources:

crate Anomaly zones img animsystem

bpLogo hudsystem-min OrangeSystem

barsystem storev2 qs3

dialSystem speedcam_img lockpick

train LicensePlate pop

6q6g5y as mg

ars imgonline-com-ua-Resize-4bDn2Cj3ozUrAixF mwpLG8T - Imgur

e5f6ad277b5836eb5fa4db2b8207c3e46beb8362 imgonline-com-ua-Resize-czg8px7HwUHn My project (1)

My project (5) My project kaws

My project (6) a bgk

bg bg st11

Code is accessible Open source: Yes \ Escrow: No - Available only: config, ui
Subscription-based No
Lines (approximately) ~2000
Requirements Standalone/ESX/QBCore
Support Yes
2 Likes

As always good job :heart:

1 Like

Thank you very much! :purple_heart:

1 Like

Awesome script 100% recommend!

Great customer support when needed as well!

1 Like

Thank you very much for your review :heart:

Update 1.0.1 of all versions

  • Added setting getting experience every N seconds.
  • Fixed a bug where in some cases players did not receive items on QBCore.
  • Minor mistakes.

:mega: Contact me if you have any questions.

Update 1.1.0 of all versions

  • The configuration file has been improved, now itโ€™s easier to configure items and missions.
  • Fixed a bug where the UI in some cases showed errors in the console.
  • Improved UI responsiveness.
New configuration files
-- /* 
-- โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ•—
-- โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–ˆโ–ˆโ•”โ•
-- โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•ฆโ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ•šโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•โ•โ–‘
-- โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ–‘โ–‘โ–‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–‘โ–ˆโ–ˆโ•”โ•โ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ•โ–ˆโ–ˆโ•—โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•—โ–‘
-- โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•ฆโ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ•šโ–ˆโ–ˆโ•”โ•โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ•šโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ•šโ–ˆโ–ˆโ•—
-- โ•šโ•โ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ–‘โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•šโ•โ•โ•šโ•โ•โ–‘โ–‘โ•šโ•โ•*/

Config = {}

-- Are you using ESX?
Config.UseESX = true
-- Enable this if ESX throws an error: Used the getSharedObject Event, this event no longer exists!
Config.UseESX_lib = false
-- Are you using QBCore?
Config.UseQBCore = false
-- Are you using QBCore?
Config.UseStandalone = false

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")
            },
        },
    },
    [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")
            },
        },
    },
    [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")
            },
            {
                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")
            },
            {
                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")
            },
        },
    },
}

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")
            }
        }
    },
    [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")
            },
            {
                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")
            },
            {
                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")
            },
            {
                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")
            },
        }
    },
    [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")
            }
        }
    },
    [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")
            },
            {
                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")
            },
        }
    }
}


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)
    },
}

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function buy(battlepassType)
    local yourFunction = yourFunction.GetPlayerId(source)
    if battlepassType == 0 then
        if yourFunction.getMoney() >= Config.PassPrice1 then
            yourFunction.removeMoney(Config.PassPrice1)
            MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1' WHERE owner ='"..identifier.."'")
        end
    elseif battlepassType == 1 then
        if yourFunction.getMoney() >= Config.PassPrice2 then
            yourFunction.removeMoney(Config.PassPrice2)
            MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1',`level` = `level`+ 20 + `level` WHERE owner ='"..identifier.."'")
        end
    elseif battlepassType == 2 then
        if yourFunction.getMoney() >= Config.PassPrice3 then
            yourFunction.removeMoney(Config.PassPrice3)
            MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1',`level` = `level`+ 100 + `level`  WHERE owner ='"..identifier.."'")
        end
    end
end

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function buyLvl(lvlAmount, amount)
    local yourFunction = yourFunction.GetPlayerId(source)
    if yourFunction.getMoney() >= amount then
        yourFunction.removeMoney(amount)
        MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `level` = `level`+'"..lvlAmount.."' WHERE owner ='"..identifier.."'")
    end
end

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function reward(battlepassRewardtype, battlepassReward)
    local yourFunction = yourFunction.GetPlayerId(source)
    if battlepassRewardtype == "money" then 
        yourFunction.addMoney(tonumber(battlepassReward))
    elseif battlepassRewardtype == "item" then 
        yourFunction.addInventoryItem(battlepassReward, 1)
    end
end

---You need to change this if you want to use a Standalone version or your own framework distinguishable from ESX or QBCore
---Insert your Standalone variables into this function
function gift(giftID)
    local yourFunction = yourFunction.GetPlayerId(source)
    if yourFunction.getMoney() >= Config.GiftPassPrice then
        yourFunction.removeMoney(Config.GiftPassPrice)
        MySQL.Async.execute("UPDATE `burevestnik_battlepass` SET `status` = '1' WHERE id ='"..giftID.."'")
    end
end


--Event to open the menu
--TriggerEvent('bur_nui_battlepass:open')

---------------------------------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_minusExp(amount) 
-- exports.Burevestnik_battlepass:Burevestnik_battlepass_progQuest(id,amount)   

:mega: Contact me if you have any questions.

1 Like

Good Scripter! Support 10/10 :+1:

1 Like

Thanks you for the review :purple_heart:

Great resource and as always, fast support! :fire:

1 Like

Thank you very much! :green_heart:

1 Like

Very good support, helped to fix bugs, everything works, good script, recommend to buy :slight_smile:

1 Like

Thank you very much! :heart:

Update 1.1.1 of all versions

  • Fixed a bug that in some cases duplicated player IDs.
  • Updated MySQL file.

:mega: Contact me if you have any questions.

It looks like Majestic Battlepass.

1 Like

Nice job man

1 Like

Thanks for the review :heart:

I appreciate your feedback. If you have any concerns regarding the origin of the UI designs, please donโ€™t hesitate to reach out to the FiveM support team. They can verify your suspicions. :cowboy_hat_face:

1 Like