gta6/prompts
ui
Coreintermediateui

Progress Bar for Timed Actions

A reusable progress-bar export for timed actions that cancels on move, on the X key, or on death and returns done/cancelled.

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

Description

A progress bar primitive for any timed action — lockpicking, repairing, searching. It exposes exports['progress']:progress(opts) which shows an NUI bar for opts.duration, polls every 50ms, and cancels if the player moves more than 2m, presses X, or dies. It returns true when the action completed and false when cancelled, so callers only grant rewards on success.

Prompt Template

You are writing a FiveM CLIENT script: a cancellable progress bar via NUI. No…

🔒 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 lives at content/expected-outputs/ui/05-progress-bar.lua. It…

🔒 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

  • Uncancellable barWait(duration) blocks the whole action; poll with Wait(50) and accumulate elapsed so cancellation works.
  • Bad distance check — use #(nowCoords - startCoords) (vector magnitude), not component-wise or == comparisons.
  • Overlapping bars — without a single in-flight guard two actions run at once and double-reward.
  • Reward on cancel — always branch on the returned boolean; never grant the payout unconditionally after the call.

Integration Notes

  • Place in client/client.lua; declare a client_script plus ui_page and files {} in fxmanifest.lua.
  • No framework dependency; any resource can exports['progress']:progress({...}).
  • Test: run /lockpick, stand still to complete it, then run it again and walk away (or press X) to confirm it cancels and withholds the reward.

Profit Potential

$150–$2000/mo on Tebex (expected ~$500). [INFERRED] mid of the $50-389 band (tebex_snapshot, median seller $11.85K/mo, n=100); progress bars are a dependency for lockpick/repair/search scripts, so steady cross-resource pull.

Trend Signal

stable — [INFERRED] HUD/UI utilities are always-needed but commoditized.

Sales Angle

Sell as a cancellable progress-bar export every timed-action script (lockpick, repair, search) reuses. Recommend $69 on Tebex.

Difficulty & Ship Time

intermediate · ships in 3-5h.