[ESX] Civilian & Criminal Battlepass

Do It Digital Battlepass Script


Description:

This is a highly customizable and optimized resource that allows users to have a battlepass in which they can get rewards by playing in your server
It contains a civilian and a criminal battlepass (you can set unlimited levels) and you can choose which players can use it, or if you want to be enabled for all. Extra options to check if a player is criminal.
Very easy config

Check config example
Config.Command = 'battlepass'			--Command to open the battlepass
Config.EnableLog = false				--Send discord logs? Check server_functions.lua to enter your discod webhook
Config.EnableWhitelist = false			--If true everyone can use battlepass, false if you want to be whitelisted
Config.IsEveryoneCriminal = false		--If true everyone can use the criminal battlepass, false if you want specific players [Check server_functions.lua function IsPlayerCriminal(player)]
Config.ShowNotificationMaxXp = true		--If true a notification will be shown if max xp is reached
Config.ImagePath = 'https://cfx-nui-'..GetCurrentResourceName()..'/html/images/items/'	--Path of images of items [image must be .png]

Config.BattlepassAccess = {		--Which type of admins can use the battlepass admin commands
	['superadmin']	= true,
	['admin']		= true
}

Config.CivilianXpPerMinute = 10			--How many civilian XP the player gets per minute
Config.MaxCivilianXpPerLevel = 1000		--Max civilian XP per level
Config.CivilianTimer = 60				--Interval in seconds to update the player's civilian XP

Config.CriminalXpPerMinute = 20			--How many criminal XP the player gets per minute
Config.MaxCriminalXpPerLevel = 1200		--Max criminal XP per level
Config.CriminalTimer = 60				--Interval in seconds to update the player's criminal XP

Config.Prices = {
	['civilian'] = {
		LevelPrice = 1000,				--Price to buy a civilian level
		resetPrice = 10000				--Price reset civilian battlepass
	},
	
	['criminal'] = {
		LevelPrice = 1000,				--Price to buy a criminal level
		resetPrice = 10000				--Price reset criminal battlepass
	},
}

--title:	The title
--item:		The spawnname of item (bread, water, etc...), weapon (WEAPON_PISTOL, WEAPON_CARBINERIFLE, etc...), money name (money, black_money etc...)
--amount:	Amount of item to give, money to give, weapon bullets to give
--type:		Available types: item, money, weapon
--desc:		The description

Config.CivilianLevelRewards = {
	{title = 'MONEY',					item = 'money',					amount = 500,		type = 'money',			desc = 'WIN 500$'},
	{title = 'WATER',					item = 'water',					amount = 5,			type = 'item',			desc = 'WIN X5 WATER'},
	{title = 'BREAD',					item = 'bread',					amount = 8,			type = 'item',			desc = 'WIN X8 BREAD'},
	{title = 'COPPER',					item = 'copper',				amount = 2,			type = 'item',			desc = 'WIN X2 COPPER'},
	{title = 'BANDAGE',					item = 'bandage',				amount = 1,			type = 'item',			desc = 'WIN X1 BANDAGE'},
	{title = 'MONEY',					item = 'money',					amount = 500,		type = 'money',			desc = 'WIN 500$'},
	{title = 'WATER',					item = 'water',					amount = 5,			type = 'item',			desc = 'WIN X5 WATER'},
	{title = 'BREAD',					item = 'bread',					amount = 8,			type = 'item',			desc = 'WIN X8 BREAD'},
	{title = 'COPPER',					item = 'copper',				amount = 2,			type = 'item',			desc = 'WIN X2 COPPER'},
	{title = 'BANDAGE',					item = 'bandage',				amount = 1,			type = 'item',			desc = 'WIN X1 BANDAGE'},
}

Config.CriminalLevelRewards = {
	{title = 'BLACK MONEY',				item = 'black_money',			amount = 1000,		type = 'money',			desc = 'WIN 1000 BLACK MONEY'},
	{title = 'CANNABIS',				item = 'cannabis',				amount = 5,			type = 'item',			desc = 'WIN X5 CANNABIS'},
	{title = 'MARIJUANA',				item = 'marijuana',				amount = 1,			type = 'item',			desc = 'WIN X5 MARIJUANA'},
	{title = 'PISTOL',					item = 'WEAPON_PISTOL',			amount = 100,		type = 'weapon',		desc = 'WIN A PISTOL WITH 100 BULLETS'},
	{title = 'CARBINE RIFLE',			item = 'WEAPON_CARBINERIFLE',	amount = 300,		type = 'weapon',		desc = 'WIN A CARBINE RIFLE WITH 300 BULLETS'},
	{title = 'BLACK MONEY',				item = 'black_money',			amount = 1000,		type = 'money',			desc = 'WIN 1000 BLACK MONEY'},
	{title = 'CANNABIS',				item = 'cannabis',				amount = 5,			type = 'item',			desc = 'WIN X5 CANNABIS'},
	{title = 'MARIJUANA',				item = 'marijuana',				amount = 1,			type = 'item',			desc = 'WIN X5 MARIJUANA'},
	{title = 'PISTOL',					item = 'WEAPON_PISTOL',			amount = 100,		type = 'weapon',		desc = 'WIN A PISTOL WITH 100 BULLETS'},
	{title = 'CARBINE RIFLE',			item = 'WEAPON_CARBINERIFLE',	amount = 300,		type = 'weapon',		desc = 'WIN A CARBINE RIFLE WITH 300 BULLETS'},

Requirements:

  • es_extended (1.1, 1.2, 1.6, 1.8)
  • mysql_async or oxmysql that supports mysql asyncs functions

Commands

  • battlepass_addplayer [target id] Add a player to the battlepass (if battlepass is whitelisted and you want specific players to have access)
  • battlepass_removeplayer [target id] Wipes a specific user’s battlepass
  • battlepass_wipe Wipes all the battlepass progress

It uses the official CFX escrow encryption that ensures buyer’s and seller’s protection. Remember that in order to run this protection system you must use the latest artifacts and a licensekey from your CFX account.


Video: Fivem & GTA V Script : Do It Digital Battlepass - YouTube


You can buy it at our Store: https://tebex.doitdigital.shop/package/5384362


Check out our other packages:

Billboards:

Maps:

Scripts:

Weapons:

Code is accessible No
Subscription-based No
Lines (approximately) N/A
Requirements ESX & mysql_async
Support Yes
4 Likes

is it possible to just have a single battle pass instead of 2