Choose/Create your locale -> Config.Locale | Check locales folder
Define your Tebex Packages 👇
Config.lua
Config.Tebex = { redeem =true, -- set to false to disable tebex redeem feature packages = { { label ="1000 Coin package", -- Put whatever you want coins =1000, -- How many coins the player receives packageID =5721342-- Tebex Package ID }, { label ="5000 Coin package", coins =5000, packageID =5723242, } }}
⚒️ Customization
Never live edit the players coin balance. Always shutdown the script first or use the built in commands.
Learn how to customize the coin shop.
The script uses Font Awesome Icons (free), in some cases you will be able to write html directly in the config.
🏠 Home Page
In the Home page there are 2 rows: Donator/Vip Packages and Mystery Boxes.
You can disable each row if you want.
🪙 Donator Packages ( 1 Row ) You can disable this.
This first row is meant to display your paid packages or donator roles to your players.
If players click on the buy button, their browser will open a new tab with the link you provided.
Let's define some packages:
Config.HomeMenu = { label ="Home", -- Title of the sidebar option value ="home", -- Don't change this icon ="<i class='fa-solid fa-house'></i>", -- Sidebar Icon firstRow = { enabled =true, -- change to false to disable title ="Coins", -- Row Title sizing ='static', -- static | dynamic packages = { { image ="https://www.svgrepo.com/show/452101/silver-medal.svg", label ="Donator Rank Bronze", value ="$5", button = { label ="Buy Now", link ="https://fivem.luxu.gg/package/5453166" } }, { image ="./coins.svg", -- Image url or filename (nui folder) label ="Donator Rank Silver", -- title of package value ="Price: $10", -- Price | Description change to "" to disable button = { label ="Buy Now", -- Button label link ="https://fivem.luxu.gg/package/5453166" -- Link to open on player's browser } },...
🎁 Myster Boxes ( 2 Row ) You can disable this.
This is where players can buy mystery boxes that will contain 1 random item.
Let's create a mystery box 👇
Change the probabilites, (the sum must should equal 1)
Create a box and add a name (e.g. BOX_1_NAME)
Add all the 4 groups (common, uncommon, rare, legendary)
Add items to each group.
Config.lua
--[[ Available Colors: red, blue, green, yellow, purple, orange, pink ]]Config.MysteryBoxes = { groups = { -- These are the probability groups, don't change the names. ['common'] = { probability =0.6, -- change this color ="blue" -- change this }, ['uncommon'] = { probability =0.2, color ="purple" }, ['rare'] = { probability =0.15, color ="red" }, ['legendary'] = { probability =0.05, color ="yellow" }, }, -- The sum of all probabilites should be 1, e.g. 0.6+0.2+0.15+0.05 = 1 boxes = { ['BOX_1_NAME'] = { -- Name of the Box ["common"] = { -- Add the items inside { label ="Coins", value ="coins", category ="coins", amount =5, }, }, ["uncommon"] = { { label ="Carbine Rifle Mk II", value ="weapon_carbinerifle_mk2", category ="weapon", amount =1, }, { label ="Special Carbine Mk II", value ="weapon_specialcarbine_mk2", category ="weapon", amount =1, }, }, ["rare"] = { { label ="Carbine Rifle Mk II", value ="weapon_carbinerifle_mk2", category ="weapon", amount =1, }, }, ['legendary'] = { { label ="Special Carbine Mk II", value ="weapon_specialcarbine_mk2", category ="weapon", amount =1, }, }, }, }}
Now let's go to Config.HomeMenu
Create a package with the box you created (e.g . BOX_1_NAME)
Config.HomeMenu = {... MysteryBoxes = { enabled =true, -- Enable or Disable Mystery Boxes title ="Mystery Boxes", sizing ='static', -- static | dynamic packages = { { title ="Mystery Box 1", description ="Weapons", price =50, items = Config.MysteryBoxes.boxes['BOX_1_NAME'] -- Name of the box }, } }}
Congratulations, you just created a mystery box!
🛒 Products Page
By default the coin shop comes with 2 pages: Cars and Weapons. You can remove/modify these and/or create completly new ones.
Let's create a new Product Page for Items
Product Categories
There are 3 product categories:
item
vehicle
weapon
Custom Product Categories
You can create custom product categories👇
When coding the logic for the server function, DON'T FORGET:
Always return true if you want the operation to finish, otherwise the player's item will not be removed from his coin shop inventory
Config.lua
CustomProductCategories = {
['plate'] = { -- type name
serverFunction = function(source, license, product) -- server function logic
-- If you need to close menu
TriggerClientEvent('LuxuVipShop:Client:CloseNUI', source)
if 'success' then
return true
else
Notify(source, 'Failed Withdrawing Item', 'error', 5000)
return false
end
end
},
['character'] = { -- type name
serverFunction = function(source, license, product) -- server function logic
-- If you need to close menu
TriggerClientEvent('LuxuVipShop:Client:CloseNUI', source)
if 'success' then
return true
else
Notify(source, 'Failed Withdrawing Item', 'error', 5000)
return false
end
end
}
}
Okay, now we create a product page
Here we will create a vehicles page
Config.Menus = { { enabled =true, label ="Vehicles", -- Title value ="vehicles", -- key icon ="<i class='fa-solid fa-car'></i>", -- Side bar icon products = { { label ="Nero", -- Product title value ="nero", -- item/model category ="vehicle", -- category amount =1, price =100, }, { label ="Buffalo S", value ="buffalo2", category ="vehicle", amount =1, price =200, custom_img ="https://image-link.png", info = { icon =true, title ="Hello this is a custom title", body ="Description of this product lorem ", }, }, { label ="Issi", value ="issi2", category ="vehicle", amount =1, price =300, custom_img ="./image.png", -- located in the nui folder }, { label ="Sabre Turbo", value ="sabregt", category ="vehicle", amount =1, price =500, }, { label ="Zion", value ="zion", category ="vehicle", amount =1, price =600, }, }, },
Everytime the player buys one of these items, it will be sent to his inventory.
When the player withdraws, the server will exectue the built-in logic and also any other logic you created if the item category is custom.
Create limited stock products.
Define your stock groups and item stock
Config.Stock = { ["Stock_ID"] = { -- stock group identifier ["Item_name"] =10-- Max stock available }, ["mystock"] = { ["weapon_pistol"] =100, ["weapon_combatpistol"] =20 }}
When creating your pages with products, specify a stock id or not
Products page example
{ enabled =true, label ="This Page is using Stock", value ="stockpageexample", icon ='<i class="fa-solid fa-cubes-stacked"></i>', products = { { label ="Pistol", value ="weapon_pistol", category ="weapon", amount =1, price =100, stockID ="mystock", -- 👈 We specifcy the stock group info = { icon =true, title ="Hello this is a custom title", body ="This product is using stock", } },-- This product 👇 doesn't have stockid, so it has unlimited stock { label ="Pistol", value ="weapon_pistol", category ="weapon", amount =1, price =100, info = { icon =true, title ="Hello this is a custom title", body ="This product is using stock", } }, }, },
Play Time Rewards
If you want to reward players with coins for playing, you can!
Config.PlayRewards = { enabled =true, -- Enable Disable this feature delay =20, -- minutes | How much time the player needs to spend online to be rewarded coin_reward = { 1, 20 }, -- receive from 1 to 20 coins (random), change this.}
Tebex Redeem
In order for the players to redeem their tebex purchases, you need to add them here.
Config.Tebex = { redeem =true, packages = { { label ="1000 Coin package", -- This is irrelevant, put whatever you want or nothing at all coins =1000, -- coin rewards packageID =5721342-- tebex package id }, { coins =5000, packageID =5723242, } }}
❓ Info Page
The info page is meant for explaining the coin shop to your players.
You can write it using markdown syntax or providing your own html.
Example 👇
Config.InfoPage = { html = { enabled =false, -- disable if you want to use markdown pre_styled =true, -- UI CSS styles will be injected src ='./info.html' -- html file nui folder location }, markdown =[[# Information 📖<br />### Links 🔗* 🔹 Website: https://luxu.gg* 🔹 Store: https://luxu.gg* 🔹 Discord: https://discord.gg/luxu<br />### Read this 👇Phasellus ut leo tempor, pellentesque arcu vel, pharetra leo. Sed ornare tincidunt felis, et posuere velit rutrum et. Suspendisse elementum turpis sed arcu facilisis, non tempus odio facilisis. Donec sit amet turpis eu ante tincidunt consectetur in a elit. Nulla ac lectus a ipsum accumsan elementum. Pellentesque fringilla orci felis, quis pretium arcu eleifend eu. Nullam nec elit dui. Quisque nisi mauris, varius in sapien a, suscipit vulputate libero. Fusce facilisis, tortor eget molestie volutpat, diam lacus scelerisque dolor, non posuere tellus libero congue nisl. Donec luctus eleifend orci, sed tristique eros bibendum in. Cras purus eros, eleifend eget sapien id, commodo vestibulum tellus. Donec facilisis lectus at ante dignissim porttitor. Sed non neque nulla. Etiam porttitor enim sed lorem sollicitudin, a rutrum nisi finibus.
<br />### Disclaimer ⚠️Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin venenatis condimentum neque, vitae tincidunt neque malesuada nec. Cras sollicitudin tincidunt arcu, id elementum risus aliquet in. Pellentesque sagittis rhoncus pretium. Proin aliquet felis enim, at convallis mi bibendum sed. Aliquam quis justo ligula. Curabitur eu libero nisl. Nullam viverra pulvinar metus, vel posuere dolor euismod sed. Curabitur quis luctus lacus. Praesent convallis leo id blandit consectetur. Nullam dapibus, mauris sed varius condimentum, libero dui pretium purus, sit amet porttitor lorem quam vitae erat. Vestibulum ac semper quam, non egestas enim. Duis rhoncus scelerisque felis, vitae ultrices mauris maximus non.
]]