Description
A working server-wide lottery: players buy tickets at a kiosk that feed a rolling prize pot, and on a fixed schedule the server draws one ticket and auto-pays the entire pot to the winner. It is the steady-demand economy money-sink a roleplay server runs to drain excess cash and give every player a recurring reason to spend.
Prompt Template
You are writing a FiveM resource for esextended (stable, exports getSharedObject).
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 lives at content/expected-outputs/casino/08-server-lottery-draw.lua. It implements a kiosk buy event that debits cash and appends per-ticket entries, a single server-side draw loopβ¦
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 pot β Claude tracks pot and entries on the client; the draw can be forged. Keep pot, entries, the timer and payout server-side, broadcasting state to
-1. - Per-client draw timer β a draw loop in a client
CreateThreadmakes every player resolve their own winner; the schedule must be a single server loop. - One-sided net event β defining
lottery:potUpdate/drawResulton only one side breaks the HUD; both sides needRegisterNetEvent+AddEventHandler.
Corrective re-prompt: The lottery currently tracks the pot and runs the draw on the client. Move pot, the entries list, the draw timestamp and the payout entirely into server.lua, run one CreateThread that fires the draw on os.time(), and have the client only render lottery:potUpdate / lottery:drawResult.
Framework Integration
- ESX:
ESX.GetPlayerFromId(src)for buyers andESX.GetPlayerFromIdentifier(winnerId)to resolve the winner;addMoney/removeMoneyfor cash. - QBCore:
QBCore.Functions.GetPlayer(src)andQBCore.Functions.GetPlayerByCitizenId(id)for the winner;Player.Functions.AddMoney('bank', pot). - QBox:
exports.qbx_core:GetPlayer(src)/GetPlayerByCitizenId(id)with the qbx money exports for the pot payout.
Profit Potential
$150β$2000/mo on Tebex (expected ~$500). [INFERRED] priced inside the $50-389 FiveM script band against a stable economy-sink niche; corpus median seller $11.85K/mo (signal-scraper tebex_snapshot n=100).
Trend Signal
β stable β inferred: Domain: economy money-sink with steady server demand.
Sales Angle
Position as the always-on economy money-sink that keeps the server's cash supply in check β a scheduled, server-authoritative lottery with an auto-paying pot. Recommended Tebex price $89.
Difficulty & Ship Time
intermediate Β· ships in 1 day.