🎁OLRP Loot Boxes

🎯 Overview

OLRP Lootboxes is an advanced CS:GO-style loot case opening system for FiveM servers. This script provides an engaging and entertaining way for players to open mystery cases containing various rewards including money, items, weapons, and other valuable loot. The system uses weighted probability mechanics similar to CS:GO case openings for authentic gambling-style experiences.

Key Features

  • 🎲 CS:GO-Style Mechanics - Weighted probability system identical to CS:GO case openings

  • 📦 Multiple Case Types - 6 different case rarities from Common to Diamond

  • 🎨 Visual Case Opening - Animated case opening interface with spinning wheel

  • 💰 Comprehensive Rewards - Money, items, weapons, consumables, and more

  • 📊 Rarity System - 5-tier rarity system (Common, Uncommon, Rare, Epic, Legendary)

  • 🔔 Auto Notifications - Server-wide announcements for rare loot

  • 🌐 Framework Support - Compatible with QBCore and ESX

  • 🔧 Fully Configurable - Customize all case contents and drop rates

  • 📈 Webhook Logging - Track all case openings via Discord webhooks

📋 What This Script Does

1

Case Opening Interface

Visual case opening with spinning animation.

2

Random Reward System

Weighted probability-based loot distribution.

3

Rarity Tiers

5-tier system with appropriate drop rates.

4

Auto Notifications

Server-wide announcements for epic/legendary loot.

5

Reward Distribution

Items automatically added to player inventory.

6

Webhook Logging

All openings logged to Discord for admin tracking.

How It Works

1

Player Opens Case

Uses a case item from their inventory.

2

Weighted Selection

Server calculates reward based on rarity weights.

3

Visual Animation

Client displays spinning case opening animation.

4

Reward Display

Selected item is revealed to the player.

5

Auto Reward

Item is automatically added to player's inventory.

6

Notification

Rare rewards announced server-wide (if applicable).

🎮 Case Types

Common Case

  • Color: Gray (#808080)

  • Description: Contains basic items and small rewards

  • Best Rewards: $5,000, Advanced Lockpick

Uncommon Case

  • Color: Green (#00ff00)

  • Description: Better rewards with improved chances

  • Best Rewards: $10,000, Pistol Weapon

Rare Case

  • Color: Blue (#0080ff)

  • Description: Premium rewards with rare items

  • Best Rewards: $50,000, Micro SMG

Epic Case

  • Color: Purple (#8000ff)

  • Description: High-tier rewards with epic weapons

  • Best Rewards: $250,000, Assault Rifle

Legendary Case

  • Color: Orange (#ff8000)

  • Description: Ultimate rewards with legendary weapons

  • Best Rewards: $1,000,000, Combat MG

Diamond Case

  • Color: Cyan (#00ffff)

  • Description: Ultimate premium rewards with exclusive items

  • Best Rewards: $1,000,000, Combat MG

📊 Rarity & Drop Rates

The system uses a weighted probability system similar to CS:GO:

Rarity
Weight
Drop Chance

Common

60

60%

Uncommon

25

25%

Rare

10

10%

Epic

4

4%

Legendary

1

1%

Total Weight System

  • Each rarity has a specific weight value

  • Total weight = 100 (60 + 25 + 10 + 4 + 1)

  • Higher weight = more common drops

  • Lower weight = rarer drops

🎮 Configuration

Rarity Weights

Configure drop rates for each rarity tier:

Case Configuration

Add new cases or modify existing ones in config.lua:

Webhook Configuration

Set up Discord webhook logging in s_config.lua:

🎯 Rewards

Money Rewards

  • Common: $500 - $2,500

  • Uncommon: $1,000 - $5,000

  • Rare: $5,000 - $50,000

  • Epic: $25,000 - $250,000

  • Legendary: $500,000 - $1,000,000

Weapons

  • Pistols, Micro SMGs

  • Assault Rifles

  • Combat MGs

  • And more weapons configurable in config

Items

  • Consumables (Bandages, Water, Food)

  • Lockpicks and Advanced Lockpicks

  • Phones and Electronics

  • Any configurable item

🎨 Visual Features

Case Opening Animation

  • Spinning Wheel - Visual spinning wheel showing all possible items

  • Color-Coded - Each rarity has its own color scheme

  • Smooth Transitions - Professional animations and effects

  • Case Images - Custom case images for each rarity type

  • Item Display - Large item display when opening cases

Interface

  • Modern UI - Clean, modern interface design

  • Responsive - Works on all screen resolutions

  • Sound Effects - Case opening audio effects

  • Focus Management - Proper NUI focus handling

📊 Notification System

Auto Announcements

Epic and Legendary rewards trigger server-wide notifications:

Notification Examples

  • Player won $10,000 from a Epic case!

  • Player won a Combat MG from a Legendary case!

  • Player won x10 Advanced Lockpicks from a Rare case!

🔧 Integration

Framework Support

  • QBCore - Full integration via bridge system

  • ESX - Full integration via bridge system

Adding Cases to Items

Cases are usable items that players can open. Add to your framework's items:

For ESX: add to your database or items configuration.

Webhook Logging

All case openings are logged to Discord with:

  • Player name and license identifier

  • Case rarity opened

  • Items/amount received

  • Timestamp and icon

🚀 Intended Features

  • Provide CS:GO-style case opening experience

  • Support multiple case types with different rewards

  • Use weighted probability system for realistic drops

  • Create excitement with rare loot announcements

  • Support both QBCore and ESX frameworks

  • Enable webhook logging for admin tracking

  • Customize all aspects via configuration

  • Deliver engaging player experience

⚙️ Customization

Adding New Cases

1

Add case configuration

Add case configuration to CFG.CaseList.

2

Add case image

Add case image to images/ folder.

3

Configure rewards

Configure rewards with rarity tiers.

4

Test

Test the new case.

Modifying Drop Rates

Adjust rarity weights in CFG.RarityChance:

  • Increase weight for higher drop rates

  • Decrease weight for rarer drops

  • Keep total weight balance in mind

Custom Rewards

Add any items or weapons to case loot tables:

🎲 Probability Examples

Common Case Drop Example

  • Chance for Common (60%): 60/100 = 60% drop rate

  • Likely Drops: Bandages, Water, Small amounts of money

  • Rare Drops: $2,500, Advanced Lockpick

Legendary Case Drop Example

  • Chance for Legendary (1%): 1/100 = 1% drop rate

  • Ultra Rare: $1,000,000, Combat MG

  • Most Common: Still get common items from this case


Experience the thrill of CS:GO-style case openings with OLRP Lootboxes!

Last updated