Jump to content
LOOKING FOR ROBLOX ASSETS? VISIT ROBLOXBAY.COM! ×
THE BEST DISCORD BACKUP BOT | PRESERVE YOUR DISCORD SERVER! ×

RobloxBay

Visit Site

FiveSecured

 

Stop shipping plaintext. FiveSecured encrypts, obfuscates, and licenses your Lua resources so customers run your work without ever holding your source.

Try for Free
  • 5decrypt-banner-v1.thumb.png.262b7992a5a4de66fd6633bf48af6c1c.png

2 Screenshots

About This File

🔫 Midnight Firearms

Discord-Verified Firearms Licensing System

Author: MidnightMTB
Publisher: Ottawa Region Scripts

Midnight Firearms is a multi-framework firearm licensing system for FiveM that restricts weapon usage based on Discord roles with persistent database overrides.

This allows servers to control firearm access through Discord permissions while still giving administrators the ability to manually grant or revoke licenses in-game.

Perfect for serious or semi-serious RP servers that want structured firearm access similar to real-world licensing.


Features

• Discord role-based firearm licensing
• Persistent MySQL override system
• Multi-framework compatibility
• Inventory-agnostic weapon enforcement
• Admin override panel
• Supports multiple inventory systems
• Lightweight and optimized
• Clean NUI interface
• Easy installation and configuration


🧩 Supported Frameworks

  • QBCore

  • Qbox

  • ESX

  • Standalone


📦 Supported Inventory Systems

Works with most inventory scripts including:

  • ox_inventory

  • qb-inventory

  • ps-inventory

  • lj-inventory

  • qs-inventory

  • and others

The script enforces firearm usage independently of inventory, making it broadly compatible.


⚙️ Requirements

  • ox_lib

  • oxmysql

  • Discord Bot Token


🛠 Installation

1️⃣ Import the SQL

Import the included SQL file into your database.

 
 
DB.sql
 

2️⃣ Add the resource

Place the script in your server resources folder.

Example:

 
 
resources/[scripts]/midnight_firearms
 

3️⃣ Ensure the resource

Add to server.cfg

 
 
ensure oxmysql
ensure ox_lib
ensure midnight_firearms
 

4️⃣ Configure the script

Open config.lua and configure:

 
 
Config.GuildId = "YOUR_DISCORD_GUILD_ID"
Config.AllowedRoleId = "ROLE_ALLOWED_TO_HAVE_FIREARMS"
Config.BotToken = "YOUR_DISCORD_BOT_TOKEN"
 

🤖 Discord Bot Setup

1️⃣ Go to the Discord Developer Portal

Create a new Application


2️⃣ Create a Bot

Navigate to the Bot tab and click:

 
 
Add Bot
 

3️⃣ Copy the Bot Token

Paste it into:

 
 
Config.BotToken
 

4️⃣ Invite the bot to your server

Use the OAuth2 → URL Generator

Scopes:

 
 
bot
 

Permissions required are minimal since the script only reads member roles.


5️⃣ Get IDs

Enable Developer Mode in Discord

Right click and copy:

  • Server ID → Config.GuildId

  • Role ID → Config.AllowedRoleId


🧑‍💻 Admin Commands

 
 
/mf_allow <discordID>
 

Grant firearm access override

 
 
/mf_deny <discordID>
 

Remove firearm access

 
 
/mf_clear <discordID>
 

Clear override

 
 
/mf_refresh <serverID>
 

Refresh role cache


🔐 License

This resource is licensed under the Ottawa Region Scripts License.

You may:

✔ Use on your server
✔ Modify for personal use

You may NOT:

✖ Redistribute the script
✖ Sell the script
✖ Reupload as your own work

Author: MidnightMTB


🏷 Credits

Author: MidnightMTB
Publisher: Ottawa Region Scripts

  • Nice 1
  • Happy 1

User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...

Important Information

By continuing on Launcherleaks.net, you agree to our Terms of Use, Guidelines & Privacy Policy