gta6/prompts
racing
Vaultintermediateracing

Persistent Track-Record Leaderboard

A server-persisted per-track top-N record board storing best times, holder name, vehicle, and date via the resource KVP store.

NON-TESTÉ — the reference Lua is syntax-validated, not run in a live FiveM server. Adapt and test on your own dev server before shipping.
Est. Lua
~85 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A persistent leaderboard that keeps the top-N fastest times per track along with the holder's name, vehicle, and date, surviving restarts via the FiveM KVP store. Persistent records are the retention hook that makes racers return to reclaim a board, and it is the baseline buyers now expect from any paid race script.

Prompt Template

You are writing a FiveM Lua resource (framework via exports, e.g.

πŸ”’ 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/racing/10-track-record-leaderboard.lua keeps a per-track top-10 board, validates and inserts server-side, sorts ascending and trims, and persists the…

πŸ”’ 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

  • Memory-only board β€” records vanish on restart without SetResourceKvp/GetResourceKvpString. Persist on every change and load on start.
  • Client-trusted times β€” a submitted ms is stored unchecked; the server must validate ms > 0 and resolve the name itself, not trust the client.
  • Unbounded growth β€” never trimming to top-N bloats the KVP blob; table.remove past N every insert.

Corrective re-prompt: "The board resets on restart and grows forever. Persist it with SetResourceKvp on every change and load it via GetResourceKvpString in onResourceStart, validate ms > 0 server-side, and after each insert table.sort ascending then trim to the top-N entries."

Framework Integration

ESX: ESX = exports["es_extended"]:getSharedObject(), resolve the holder name with ESX.GetPlayerFromId(src).getName(). QBCore: exports['qb-core']:GetCoreObject(), name via Player.PlayerData.charinfo.firstname .. ' ' .. lastname from GetPlayer(src). QBox: exports.qbx_core:GetPlayer(src) for charinfo; KVP persistence is framework-agnostic.

Profit Potential

$250–$3500/mo on Tebex (expected ~$900). [INFERRED] Priced inside the $50-389 script band against the signal-scraper tebex_snapshot corpus (median seller $11.85K/mo, n=100); a retention-driving baseline feature holds the mid-to-upper band for a rising niche.

Trend Signal

β†— rising β€” inferred: [INFERRED] persistent track records drive retention; standard paid-race expectation, rising.

Sales Angle

Sell it as the retention layer racers chase β€” a board to reclaim every week. Price at $149 standalone on Tebex, or fold it into a race-suite upsell.

Difficulty & Ship Time

intermediate Β· ships in 2-4h.