vi/raiser
economy
economy, GTA 6 style illustration
Vaultintermediateeconomy

Vending Machines, Restock & Collect Revenue

QBCore/QBox target-based vending machines that players stock with product items and periodically empty to collect server-accrued passive sales revenue.

PRODUCTION-SHAPED, the reference Lua is validated and written framework-correct for ESX, QBCore, and QBox, ready to drop into your server.
Est. Lua
~95 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25
Unlock price
$199Vault

Unlock all 510 prompts

Profit potential / morising
$900($250 to $3,500)

$50-389 script band, sized for a rising niche; top sellers clear around $11.85K/mo.

Effort vs return
intermediate2-4h

Description

Placeable vending machines players stock with a product item and later empty to collect accrued sales revenue. While stocked, a server-side thread quietly sells units over time and banks the proceeds against the machine, so the owner returns to a payout, a low-effort passive-income loop that gives roleplay servers a player-run vending economy.

Prompt Template

You are writing a FiveM resource for QBCore (QBox-compatible). Framework via exports:…

🔒 Eyes-only, locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth, both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access, pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts, the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates, new niches as the market moves
Get the Vault, $199

$49 for 60 · $199 for all 510 + intelligence, one-time, no subscription.

Expected Output

The reference Lua at content/expected-outputs/economy/29-vending-machine-passive-revenue.lua implements a qb-target restock/collect interaction with a server-authoritative machines table, an…

🔒 Eyes-only, locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth, both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access, pay once
Most Popular · Best Value
Vault$199one-time
  • All 510 prompts, the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates, new niches as the market moves
Get the Vault, $199

$49 for 60 · $199 for all 510 + intelligence, one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Client-held state, stock/revenue on the client lets a spoofed collect mint cash. Keep all state server-side.
  • Anim before load, TaskPlayAnim without the HasAnimDictLoaded wait-loop T-poses the ped or no-ops.
  • No owner check, anyone can empty anyone's machine; gate collect on citizenid.

Corrective re-prompt: "Move the stock and revenue tables entirely server-side, gate vending:collect on machine.owner == Player.PlayerData.citizenid, and ensure the restock anim does RequestAnimDict + while not HasAnimDictLoaded(dict) do Wait(0) end before TaskPlayAnim."

Framework Integration

ESX: swap to ESX.GetPlayerFromId(src), xPlayer.addAccountMoney('bank', payout) and xPlayer.getInventoryItem('vending_product'); use a qtarget/ox_target zone. QBCore: as written, QBCore.Functions.GetPlayer, Player.Functions.AddMoney/RemoveItem, qb-target. QBox: identical exports surface; prefer exports.ox_target:addBoxZone and exports.ox_inventory for the product item.

Profit Potential

$250-$3500/mo on Tebex (expected ~$900), priced inside the $50-389 standalone-script band against a corpus of comparable Tebex sellers (median ~$11.85K/mo) for a rising economy niche.

Trend Signal

rising, corpus: Vending/passive-income scripts are an established Tebex economy category (tebex_topsellers cat:economy); placeable/target build skews qb/qbox.

Sales Angle

Position as drop-in passive income for QB/QBox servers that want player-owned vending without a heavyweight business framework. Recommended Tebex price: $89.

Difficulty & Ship Time

intermediate · ships in 2-4h.