[RELEASE] [FREE] Random Boxes (Mystery Boxes / Loot Boxes)

Free loot box script for FiveM

I have created a free random item box for use in ESX and QBcore servers. There is an option to enable in game purchases to allow players an opportunity to try for the loot and provide a resource sink for your economy.

Features:

  • Config allows for a highly customized experience
  • Up to five tiers of loot box able to be programmed
  • Each tier can be individually configured to be publicly accessible
  • Option to allow each tier to pull a predetermined number of items for a general loot pool for filler (make your loot boxes feel fuller)
  • Images for each tier box included

Config Snipit:

GitHub Link for downloading: Random Box

Other Free Scripts By Me:
Elevators
Free VIN Scratch
Car Flipping
Metal Detectors
Loot Boxes
Gang Heist
Police Database Search
Police K9
Yacht Heist
Billing
Medical Diseases / Illnesses
Drug Harvest
Police Cell Ping
Number Game
Civilian Job Mega Pack
Simple Craft
Target Ping
Full Steal
Bank Truck Robbery

Paid Scripts by Me:
Fuel Delivery Job
Rep Based Vehicle Heist
Mining/Delivery Job
Police Tracker
Police Impound & Tow Job
Bank Job

13 Likes

so nice

Hi, we installed this script but when you open the gift box it would give you the items but it would spam giving the item over and over until your inventory was full. Any idea why? This is a really cool script and would like to get it working as intended

There were no errors in the server console or F8. This did it with a fresh download (no modifications) as well on qb-core

I found the issue, a variable was not being carried over when using the item. This variable is now properly pushed forward and the issue is resolved.

Great, we’ll try it.
Thanks


any help

That looks like you didn’t add the items to your framework.
For convenience (QBCORE)

    ['tier1giftbox'] 				 = {['name'] = 'tier1giftbox', 					['label'] = 'Tier 1 Gift Box', 			['weight'] = 500, 		['type'] = 'item', 		['image'] = 'tier1giftbox.png', 		['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Wow! A tier 1 gift box!'},
	['tier2giftbox'] 				 = {['name'] = 'tier2giftbox', 					['label'] = 'Tier 2 Gift Box', 			['weight'] = 500, 		['type'] = 'item', 		['image'] = 'tier2giftbox.png', 		['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Wow! A tier 2 gift box!'},
	['tier3giftbox'] 				 = {['name'] = 'tier3giftbox', 					['label'] = 'Tier 3 Gift Box', 			['weight'] = 500, 		['type'] = 'item', 		['image'] = 'tier3giftbox.png', 		['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Wow! A tier 3 gift box!'},
	['tier4giftbox'] 				 = {['name'] = 'tier4giftbox', 					['label'] = 'Tier 4 Gift Box', 			['weight'] = 500, 		['type'] = 'item', 		['image'] = 'tier4giftbox.png', 		['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Wow! A tier 4 gift box!'},
	['tier5giftbox'] 				 = {['name'] = 'tier5giftbox', 					['label'] = 'Tier 5 Gift Box', 			['weight'] = 500, 		['type'] = 'item', 		['image'] = 'tier5giftbox.png', 		['unique'] = false, 	['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Wow! A tier 5 gift box!'},

In accordance to new R* and Tebex policy changes, lootboxes are not allowed to be purchased for real money on fivem. Please modify your resource to no longer include this functionality.

Hello,
There is nothing inherently in the script itself that is automatically tied to Tebex.

I have removed the mention of purchasing with Tebex or real money.

Hey, very nice script, you can also write cars in the config that you then get placed in the garage? :smile:

thanks

Unfortunately this is strictly item based.

Las funciones de esx para el nuevo esx estan muy mal redactadas, pésimo.

It seems you have an issue with how this free, publicly available script is written. However, you have not provided any specifics, examples of how it may be improved or any other constructive feedback. As such this is a very poor comment and does not help the community or myself improve.

1 Like

so when ever i edit the name and the item inside of the box it don’t let me open the box i don’t know if i have to restart my server but hopefully that’s the reason

Make sure that the item exists inside your server.

So I have my Third Eye Script Working, Now when I go to purchase a BOX it doesnt take my money? I am on ESX and it doesnt give me a box or a item nothing is happening apon clicking.

im having problems with this script on esx legacy with ox inventory.

After opening 1 or 2 crates the server we start to freeze and will automatically restart because there is a ‘‘hung’’ detected.

In every Config.TierList and the Config.GeneralLoot do you have AT LEAST one item that has 100% chance?