QBCore, Qbox, ESX, ox_lib and vRP

FiveM AI Script Generator

Describe the script. Get the whole resource.

Write what your server needs in plain English. The AI script maker writes the fxmanifest, client, server and config files, plus the NUI when you ask for a menu. It works from the real framework code, so the functions it calls exist.

250 free credits · a new script costs about 60 · no card needed

New project · Qbox
Prompt

  • Read framework code from qbx_vehicleshop, qbx_vehiclekeys, ox_lib
  • Looked up “Qbox vehicle spawn server callback CreateVehicle network vehicle keys export”
  • Looked up “ox_target addLocalEntity onSelect Qbox NPC”
  • Looked up “Qbox AddMoney RemoveMoney GetMoney ox_lib callback”
  • fxmanifest.lua28 lines
  • config/main.lua33 lines
  • client/main.lua94 lines
  • server/main.lua141 lines
  • README.md25 lines
  • Done: 5 files, 321 lines

A real run from October 2, 2026, 74 seconds, replayed faster.

UIs it built from one sentence

Ask for a menu and you get the html, css and js with it. We sent twelve UI requests on October 2 and kept the seven that looked best. The layouts are untouched; the names and numbers are sample data we sent in, as the game would.

Banking appQBCore · 3 min 13 s · 8 files

“A banking app NUI at the bank NPCs: show balance, deposit, withdraw, transfer money to another player by server ID, and a transaction history list.”

Police MDTQbox · 3 min 21 s · 9 files

“A police MDT tablet opened with /mdt for the police job: search citizens by name, show their licenses and warrants, and write incident reports saved to the database.”

Vehicle shopQbox · 2 min 20 s · 8 files

“A vehicle shop with a nice NUI: browse cars by category, show stats like top speed, acceleration and braking, the price, a color picker and a test drive button. Pay with bank money.”

Loading screenStandalone · 1 min 13 s · 7 files

“A modern loading screen with the server logo, rotating gameplay tips, a progress bar and a music on/off button.”

PhoneQBCore · 3 min 11 s · 8 files

“A phone-style NUI opened with F1 with three apps: contacts, messages between players, and a bank balance view.”

Fuel stationQbox · 2 min 39 s · 7 files

“A fuel station NUI: pick how many liters, see the price update live, choose cash or bank, and a progress animation while refueling.”

Crafting benchQBCore · 2 min 37 s · 7 files

“A crafting bench with a polished NUI: a list of recipes with the items each one needs, a progress bar while crafting, using qb-inventory items.”

Three scripts, straight from the generator

We sent three requests on October 2 and kept what came back. One prompt each, no follow-up, nothing edited. The slowest took 2 min 19 s, the one with a full shop UI.

The prompt, word for word

Make a police duty script: /clockin and /clockout for the police job. While on duty pay $150 to the bank every 15 minutes and show a notify. Only works near the Mission Row PD.

Time
48 s
Files
5
Lines
190

What to look for

  • Job and distance are checked on the server, so the event cannot be fired from across the map.
  • Pays with Player.Functions.AddMoney("bank", amount, reason), the call qb-core actually exposes.
  • Clears duty when a player drops and when the resource stops.

Files it wrote

  • fxmanifest.lua24 lines
  • config.lua15 lines
  • client/main.lua19 lines
  • server/main.lua109 lines
  • README.md23 lines
server/main.lualines 76 to 92, unedited
CreateThread(function()
while true do
Wait(Config.PaymentInterval)
for playerId in pairs(activeDuty) do
local Player = QBCore.Functions.GetPlayer(playerId)
if not Player then
activeDuty[playerId] = nil
elseif Player.PlayerData.job.name ~= Config.PoliceJob or not Player.PlayerData.job.onduty then
activeDuty[playerId] = nil
else
Player.Functions.AddMoney("bank", Config.PaymentAmount, "police-duty-pay")
notifyPlayer(playerId, ("You received $%d for 15 minutes of police duty"):format(Config.PaymentAmount), "success")
end
end
end
end)
Show the whole server/main.lua (109 lines)
local QBCore = exports["qb-core"]:GetCoreObject()
local activeDuty = {}
--- Check whether a player's ped is within the Mission Row Police Department clock-in area.
--- @param playerId number The server player ID.
--- @return boolean isNearby Whether the player is close enough to the station.
local function isNearMissionRow(playerId)
local playerPed = GetPlayerPed(playerId)
if playerPed == 0 then
return false
end
local playerCoords = GetEntityCoords(playerPed)
return #(playerCoords - Config.MissionRow.coords) <= Config.MissionRow.radius
end
--- Send a notification to a player through the QBCore client notification system.
--- @param playerId number The server player ID.
--- @param message string The notification message.
--- @param notificationType string The QBCore notification type.
local function notifyPlayer(playerId, message, notificationType)
TriggerClientEvent("policeduty:client:notify", playerId, message, notificationType)
end
--- Set a police player's duty state after validating their job and station distance.
--- @param playerId number The server player ID.
--- @param dutyState boolean The requested duty state.
local function setDuty(playerId, dutyState)
local Player = QBCore.Functions.GetPlayer(playerId)
if not Player then
return
end
if Player.PlayerData.job.name ~= Config.PoliceJob then
notifyPlayer(playerId, "Only police officers can use the duty commands", "error")
return
end
if not isNearMissionRow(playerId) then
notifyPlayer(playerId, "You must be at Mission Row PD to clock in or out", "error")
return
end
if dutyState then
if activeDuty[playerId] and Player.PlayerData.job.onduty then
notifyPlayer(playerId, "You are already clocked in", "primary")
return
end
Player.Functions.SetJobDuty(true)
activeDuty[playerId] = true
notifyPlayer(playerId, "You are now on duty", "success")
return
end
if not activeDuty[playerId] and not Player.PlayerData.job.onduty then
notifyPlayer(playerId, "You are already clocked out", "primary")
return
end
Player.Functions.SetJobDuty(false)
activeDuty[playerId] = nil
notifyPlayer(playerId, "You are now off duty", "success")
end
RegisterNetEvent("policeduty:server:setDuty", function(dutyState)
local playerId = source
if type(dutyState) ~= "boolean" then
return
end
setDuty(playerId, dutyState)
end)
CreateThread(function()
while true do
Wait(Config.PaymentInterval)
for playerId in pairs(activeDuty) do
local Player = QBCore.Functions.GetPlayer(playerId)
if not Player then
activeDuty[playerId] = nil
elseif Player.PlayerData.job.name ~= Config.PoliceJob or not Player.PlayerData.job.onduty then
activeDuty[playerId] = nil
else
Player.Functions.AddMoney("bank", Config.PaymentAmount, "police-duty-pay")
notifyPlayer(playerId, ("You received $%d for 15 minutes of police duty"):format(Config.PaymentAmount), "success")
end
end
end
end)
AddEventHandler("playerDropped", function()
activeDuty[source] = nil
end)
AddEventHandler("onResourceStop", function(resourceName)
if resourceName ~= GetCurrentResourceName() then
return
end
for playerId in pairs(activeDuty) do
local Player = QBCore.Functions.GetPlayer(playerId)
if Player and Player.PlayerData.job.name == Config.PoliceJob and Player.PlayerData.job.onduty then
Player.Functions.SetJobDuty(false)
end
end
end)

How it works

The same three steps produced every example above.

  1. 01

    Describe the script

    Write it the way you would explain it to another developer: what starts it, what it pays or gives, and where it works. Pick your framework when you create the project.

  2. 02

    It reads, looks up and writes

    It starts from matching code in 91 framework and community repositories, looks up any call it is unsure about, and writes every file the resource needs.

  3. 03

    Test it and keep talking

    Download the folder or push it to GitHub. If the console shows an error, paste it into the chat and it fixes the file. A round of changes costs about 100 credits.

Why the code calls functions that exist

A general chat model has seen little FiveM code. Ask it to pay a QBCore player and it can write a call that sounds right but is not in qb-core. Here is the difference on the same task.

A typical guess
QBCore.Functions.AddMoney(source, "bank", 150)

qb-core has no QBCore.Functions.AddMoney. The server prints “attempt to call a nil value” and nobody gets paid.

From the QBCore example above
Player.Functions.AddMoney("bank", Config.PaymentAmount, "police-duty-pay")

The money call qb-core defines on the player object in server/player.lua, with the reason that ends up in the logs.

It starts from real code

24,133 passages from 91 repositories: qb-core, qbx_core, esx-legacy, ox_lib, oxmysql, ox_inventory, ox_target, the FiveM natives and widely used community resources. The parts that match your request go in before the first line is written.

It looks things up while writing

When it is not sure how a call works, it searches that index before it writes the line. The Qbox example above did this three times, for vehicle keys, ox_target and money.

It checks the UI against the Lua

For resources with a NUI, a checker compares what the Lua sends with what the JavaScript handles, and sends mismatches back to fix. Run over 90 days of past projects, it found a mismatch in 294 of 2,291 NUI resources. Since October 1 it runs on every generation.

How to write a prompt that works

The better the request, the fewer rounds you pay for. Four habits make the biggest difference.

  • Say what starts it

    A command, a key, an ox_target option, a marker, using an item. One line saves a round of questions.

  • Give the numbers

    Prices, payouts, timers, distances, job names. Anything you leave open, the AI has to guess.

  • Name the resources you run

    ox_target or qb-target, ox_inventory or qb-inventory, ox_lib notify. It then writes for your server, not a generic one.

  • One resource per request

    Get the core working first, then add features in follow-up messages. Each change is smaller and easier to check.

Too vague

make a police script

Specific enough for one round (the QBCore example above)

Make a police duty script: /clockin and /clockout for the police job. While on duty pay $150 to the bank every 15 minutes and show a notify. Only works near the Mission Row PD.

More on this in how to prompt AI for FiveM Lua.

SwisserAI or ChatGPT for FiveM scripts?

General chat models are strong coders. For FiveM they miss the framework source, so you check every call yourself. If FiveM is only a small part of your work, that can be fine.

SwisserAIChatGPT or Claude (chat)
Reads qb-core, qbx_core and esx-legacy source while writingYesOnly what you paste in
Writes the whole resource (manifest, client, server, config, NUI)Yes, as filesMostly code blocks to copy
Looks up unknown FiveM calls before using themYes, in the framework indexOnly if you paste the docs
Checks the NUI messages against the LuaYesNo
General coding outside FiveMFineBetter
Price250 free credits, plans from $9.99Free plan, paid plans

Eight FiveM AI tools side by side: the 2026 comparison.

What a script costs

You pay in credits for what the AI actually reads and writes, so a small script costs less than a large one. The first two rows are medians from the last 30 days.

WhatCreditsDetail
A new scriptabout 60Median of the last 30 days. Half of all new scripts cost between 45 and 80.
A round of changesabout 100Median 97. Bigger projects cost more, because the AI reads more files.
Free start250Enough for a first script and about two rounds of changes. Use them within 14 days.
Hobby, $9.99 a month7,500About 48 new scripts with one round of changes each.
Pro, $19.99 a month20,000About 129 scripts with one round of changes each.

Credits work across every tool here, from scripts to 3D models. See all plans

Frequently Asked Questions

You can start free. A new account gets 250 credits, enough for a first script and about two rounds of changes, plus 25 credits a day when you log in. Plans start at $9.99 a month for 7,500 credits. No card is needed to start.

QBCore, Qbox, ESX (Legacy), ox_lib and vRP. It uses the calls of the framework you pick: QBCore.Functions and Player.Functions for QBCore, exports.qbx_core for Qbox, ESX.GetPlayerFromId and xPlayer for ESX. It does not mix them.

Yes. Upload the resource or paste the file, then paste the console error into the chat. It reads the files, finds the cause and edits the file. You can also import a project from GitHub.

Yes. Ask for a menu and it writes the html, css and js next to the Lua, as in the ESX shop example above. A checker then makes sure the messages between the Lua and the UI match.

Yes. There is a SwisserAI extension for VS Code, and an OpenAI-compatible API at ai.swisser.dev/v1 that Cursor, Continue and Roo Code can use.

You do. Our terms say you keep ownership of the code you generate, and we claim no rights to it.

Generate your first FiveM script free

250 credits to start, no card. Describe the script, pick your framework, test it on your server.