vi/raiser
racing
racing, GTA 6 style illustration
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.

PRODUCTION-SHAPED, the reference Lua is validated and written framework-correct for ESX, QBCore, and QBox, ready to drop into your server.
Est. Lua
~105 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
advanced1 day

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), priced inside the $50-389 script band against a corpus of comparable Tebex sellers (median ~$11.85K/mo); a ghost-replay differentiator commands the top of the band for a rising niche.

Trend Signal

↗ rising, 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.