Description
A server-authoritative sanity / stress meter for ESX or QB: traumatic events (downs, witnessing deaths, robberies) drain a 0-100 sanity value, and once it drops below a threshold the client applies a wobble timecycle, motion blur and gameplay-cam shake. Players recover by attending a therapy session — a timed seated animation the server validates before restoring sanity. Servers sell it because it adds a whole new survival axis to roleplay without touching the HP system.
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/medical/25-mental-health-sanity-meter.lua. It implements a server-owned sanity value, a client sync handler that applies/clears wobble-blur-shake…
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-trusted sanity — Claude tracks the value locally; keep it server-side keyed by source and sync down only.
- Therapy before anim load — granting the heal before
HasAnimDictLoadedlets players spam-recover; gate it behind the wait loop and a server event. - One-sided net event —
sanity:syncon only one side means debuffs never re-apply after a restart; both sides useRegisterNetEvent+AddEventHandler.
Corrective re-prompt: "Move the sanity value entirely into server.lua keyed by source, validate the trauma amount (reject <=0 or >50), only grant the +40 therapy heal in the server handler after the client confirms the seated anim finished, and re-push the value with TriggerClientEvent on every change."
Framework Integration
- ESX:
local ESX = exports['es_extended']:getSharedObject(); persist sanity viaxPlayer.set('sanity', value)if you want it to survive relogs. - QBCore:
local QBCore = exports['qb-core']:GetCoreObject(); store onPlayer.PlayerData.metadata.sanitythroughPlayer.Functions.SetMetaData. - QBox: use
exports.qbx_core:GetPlayer(src)and the same metadata accessor for persistence.
Profit Potential
$250–$3500/mo on Tebex (expected ~$900). [INFERRED] within the $50-389 script band against the signal-scraper tebex_snapshot corpus (n=100, median seller $11.85K/mo), sized for a rising mental-health niche.
Trend Signal
↗ rising — strategy: Sanity/stress + therapy is a novel, high-defensibility deepening; mental-health RP is a trending, uncrowded lane.
Sales Angle
Position as the mental-health layer no medical pack ships — a second survival axis beside HP that deepens long-session roleplay. Recommended Tebex price $189.
Difficulty & Ship Time
intermediate · ships in 1 day.