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:…
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.
- 60 prompts + syntax-validated reference Lua
- Lifetime access — pay once
- All 510 prompts — the full library
- Per-prompt profit/trend intelligence (CSV + playbook)
- Lifetime free updates — new niches as the market moves
$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…
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.
- 60 prompts + syntax-validated reference Lua
- Lifetime access — pay once
- All 510 prompts — the full library
- Per-prompt profit/trend intelligence (CSV + playbook)
- Lifetime free updates — new niches as the market moves
$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). [INFERRED] priced inside the $50-389 standalone-script band against the signal-scraper corpus (tebex_snapshot n=100, median seller $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.