gta6/prompts
racing
Vaultadvancedracing

Time Trial with Ghost Replay

A framework-agnostic solo time-attack that records your best lap and replays a translucent ghost car of it, with best times held server-side.

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
~105 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A solo time-attack mode where the player races the clock and, on every subsequent attempt, sees a translucent ghost of their own best lap driving the racing line beside them. The ghost is the premium feature buyers can't get from a basic checkpoint racer, and the best time is held server-side so it survives reconnects and resists tampering.

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/07-time-trial-ghost-replay.lua records a lap client-side, submits the elapsed time and frame samples to a server that keeps only the best run per…

πŸ”’ 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-trusted times β€” the server stores whatever ms the client sends; a tampered client posts a 0.1s lap. The server must own the best-time comparison and reject non-positive values.
  • Ghost spawns empty β€” CreateVehicle fires before the model is resident; without the HasModelLoaded loop the ghost is invisible.
  • Ghost entity leak β€” replaying again without DeleteEntity on the old ghost stacks translucent cars and desyncs nearby players.

Corrective re-prompt: "The server is trusting the client's elapsed time and the ghost piles up on repeat runs. Move the best-time comparison fully server-side (reject elapsed <= 0), and before spawning a new ghost call DeleteEntity on the previous one and guard the model load with a HasModelLoaded wait loop plus SetModelAsNoLongerNeeded."

Framework Integration

ESX: resolve ESX = exports["es_extended"]:getSharedObject() if you gate trials behind an entry fee via xPlayer.removeMoney; the ghost itself needs no framework. QBCore: swap to exports['qb-core']:GetCoreObject() and Player.Functions.RemoveMoney for any buy-in; record/replay logic is framework-agnostic. QBox: use exports.qbx_core:GetPlayer(src) for identity on the record board; the per-player best-run table keys cleanly off the server id.

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 ghost-replay differentiator commands the top of the band for a rising niche.

Trend Signal

β†— rising β€” inferred: [INFERRED] ghost-replay time attack is a premium differentiator; rising demand.

Sales Angle

Position the ghost as the one feature stock checkpoint racers can't show off in a demo clip. Bundle it in a premium racing pack and price at $349 on Tebex.

Difficulty & Ship Time

advanced Β· ships in 1 day.