S4 Performance Lab (Fps Menu)
FPS boost menu + kill/hit effect system for FiveM. Players get a full in-game panel to tweak render settings, pick performance presets, and set up custom kill & hit effects with sounds, screen FX, par
All settings are saved per-player on the server side and auto-loaded on reconnect.
Table of Contents
Getting Started
Configuration
Locale & Keybinds
Feature Flags
Data Saving
Notifications
Kill Effect Settings
Hit Effect Settings
Sound Limits
Default Player Settings
Preset Draw Distances
Menu Tabs
FPS Tab
Live FPS Chart
Presets
Sliders
Toggles
Kill Effect Tab
Kill Toggle
Kill Style
Screen Effects
Color Picker
Kill Sounds
Hit Effect Tab
Hit Toggle
Hit Style
Screen Effects
Color Picker
Particles
Hit Sounds
Save & Load System
Commands & Keybinds
Test Ped
Localization
Dependencies
Getting Started
Drop the resource folder into your
resourcesdirectory.Add to your
server.cfg:Edit
config.luato fit your server.
That's it — players can press F7 for the FPS menu or F6 for effects.
Configuration
Everything lives in config.lua.
Locale & Keybinds
Config.Locale
'en'
Menu language. Ships with: ar, de, el, en, es, fr, it, pl, pt, ru, tr. Want another language? Copy any file in locales/ and translate it.
Config.FPSMenuKey
'F7'
Opens the FPS boost menu.
Config.EffectsMenuKey
'F6'
Opens the kill & hit effects menu.
Feature Flags
Config.EnableFPSMenu
true
Set to false to completely disable the FPS menu for everyone.
Config.EnableEffectsMenu
true
Set to false to completely disable the effects menu for everyone.
Data Saving
Config.LoadUserDataOnStart
true
Auto-load saved settings when a player connects.
Config.AutoSaveOnClose
true
Auto-save when the menu is closed.
Notifications
Config.Debug
false
Prints debug info to console. Keep this off in production.
Config.Notify
true
Shows ox_lib notifications to players. false = silent mode.
Config.NotifyDuration
3000
How long notifications stay on screen (ms).
Kill Effect Settings
These are server-wide behavior values — not personal player preferences.
Config.KillEffect.duration
3.0
How long the kill marker stays visible (seconds).
Config.KillEffect.speed
0.02
How fast the marker floats upward (units/frame).
Config.KillEffect.scale
0.5
Size of the marker.
Hit Effect Settings
Config.HitEffect.duration
0.5
How long the hit marker is visible (seconds).
Config.HitEffect.particleDuration
0.8
How long the particle effect plays (seconds).
Sound Limits
You can cap the max volume players are allowed to set:
Config.MaxKillSoundVolume
100
Max kill sound volume (0–100).
Config.MaxHitSoundVolume
100
Max hit sound volume (0–100).
Default Player Settings
The Config.Defaults block defines initial values for new players (no saved data yet). Existing players always keep their own saved settings.
FPS / Visual:
preset
nil
No preset active. Options: 'potato', 'ultra_low', 'low', 'medium'
shadowDist
5.0
Shadow distance. 0 = off, 5 = full.
objQuality
1.0
Object LOD quality (0–1).
charQuality
1.0
Character LOD quality (0–1).
vehDist
9999.0
Vehicle render distance in metres.
toggles.clearEvents
false
Auto effect cleanup.
toggles.lightReflections
true
Light reflections.
toggles.rainWind
true
Rain & wind.
toggles.bloodStains
true
Blood stains.
toggles.fireEffects
true
Fire effects.
Kill Effect:
killEnabled
false
Off by default.
killStyle
{ marker = false, screen = false }
Both sub-options off.
killFx
'DeathFailOut'
Default screen FX.
killColor
{ r=255, g=0, b=0, a=200 }
Red.
killSoundEnabled
false
Off by default.
killSoundId
'ks1'
Default sound.
killSoundVolume
50
Mid volume.
Hit Effect:
hitEnabled
false
Off by default.
hitStyle
{ particle = false, screen = false }
Both sub-options off.
hitFx
'FocusIn'
Default screen FX.
hitColor
{ r=255, g=50, b=50, a=180 }
Red.
hitParticle
scr_martin1 / scr_sol1_sniper_impact
Default particle.
hitSoundEnabled
false
Off by default.
hitSoundId
'hit1'
Default sound.
hitSoundVolume
50
Mid volume.
Preset Draw Distances
Config.DrawPresets controls LOD and entity cleanup distances for each performance level:
Potato
0.85
180 m
250 m
Ultra Low
0.80
130 m
190 m
Low
0.75
100 m
150 m
Medium
0.90
100 m
150 m
Menu Tabs
The menu has 3 tabs along the top:
FPS
Performance tuning — presets, sliders, toggles
Kill Effect
Visuals and sounds when you kill someone
Hit Effect
Visuals and sounds when you land a hit
FPS Tab
Live FPS Chart
There's a real-time FPS graph at the top of the tab. It tracks the last 30 readings (updated every 500 ms) and shows the current FPS as a big number. Useful for seeing the immediate impact of your changes.
Presets
Quick performance profiles. Pick one and everything adjusts at once:
Default
Resets everything back to normal. All optimizations off, shadows/LOD/distances restored, timecycle cleared.
Potato
Maximum FPS, minimum visuals. Shadows off, custom timecycle applied, decals/particles/occlusion disabled, artificial lights forced on, distant vehicles hidden, weather locked to CLEAR, rain & wind off.
Ultra Low
Similar to Potato but slightly less aggressive. Different timecycle combo, distant cars not fully hidden.
Low
Timecycle applied, shadows off, entity cleanup active. Less aggressive than Ultra Low.
Medium
No timecycle change, shadows at 3.0, no entity cleanup. Just light optimization.
When a preset is applied the script also runs cleanup on misc effects (broken glass, help messages, etc.) and clears ped blood/wetness/dirt.
Note: Presets can interfere with hit particles. If particles aren't showing up, go back to Default.
Sliders
Fine-tune individual settings:
Shadow Quality
0–10
1
Controls shadow render distance and quality. At 0 shadows are completely off. Uses CascadeShadows* natives.
Texture Detail
0.0–1.0
0.05
Object LOD multiplier. Lower values = objects switch to low-detail models sooner. Below 1.0, objects past 50 + (quality × 150) metres get reduced LOD.
Resolution Scale
0.2–0.9
0.05
Map/building LOD quality via OverrideLodscaleThisFrame(). Lower = less building detail. Clamped to 0.2–0.9 on both client and UI side.
Character Quality
0.0–1.0
0.05
Character LOD multiplier. Lower values reduce detail on distant peds and turn off AO blob rendering.
Vehicle Distance
18–500
10
Vehicle render cutoff in metres. Vehicles past this distance are made invisible. Floor is 18 m.
Toggles
On/off switches for specific optimizations:
Auto Cleanup
OFF
Every 500 ms: clears broken glass, removes decals and particles in a 100 m radius.
Light Reflections
ON
Turn off to disable light reflections.
Rain & Wind
ON
Turn off to force rain level and wind speed to 0 every second.
Blood Stains
ON
Turn off to clear blood on your ped and all nearby peds every 500 ms.
Fire Effects
ON
Turn off to kill all fires within 500 m and remove particles within 200 m. Runs every frame so it's aggressive.
Note: Turning off Fire Effects can break hit particle effects since it removes particles in range.
Kill Effect Tab
Everything here triggers when you kill another ped.
Kill Toggle
Master switch — turns kill effects on or off. Off by default.
The script detects kills two ways:
Listens to
CEventNetworkEntityDamageand checks theisDeadflag.Runs a fallback loop every 100 ms that scans nearby peds with
IsPedDeadOrDying()+GetPedSourceOfDeath(), so kills don't get missed.
Both methods work for vehicle kills (if you're in the driver seat).
Kill Style
Two independent sub-toggles:
Marker
Draws a 3D crosshair marker above the victim's head. Floats upward over time and fades after the configured duration. Uses DrawMarker() (type 25 + type 2). Color is customizable.
Screen
Plays a full-screen post-process effect using AnimpostfxPlay(). Auto-stops after 1 second.
You can have both on at the same time.
Kill Screen Effects
39 screen effects to choose from. All use GTA V's built-in AnimPostFX system. When you select one, it plays a 1.5-second preview.
The first 15 are shown by default. Click "Show All" to see the rest.
Full list (click to expand)
DeathFailOut
Death Fail
FocusIn
Focus In
FocusOut
Focus Out
SwitchHUDIn
HUD In
SwitchHUDOut
HUD Out
MinigameEndNeutral
End Neutral
MinigameEndTrevor
End Trevor
MinigameEndFranklin
End Franklin
MinigameEndMichael
End Michael
MinigameTransitionOut
Trans. Out
MinigameTransitionIn
Trans. In
Rampage
Rampage
RampageOut
Rampage Out
SwitchShortNeutralIn
Switch Neutral
SwitchShortFranklinIn
Switch Frank.
SwitchShortTrevorIn
Switch Trevor
SwitchShortMichaelIn
Switch Michael
SwitchOpenMichaelIn
Open Michael
SwitchOpenFranklinIn
Open Franklin
SwitchOpenTrevorIn
Open Trevor
SwitchHUDMichaelOut
HUD Michael
SwitchHUDFranklinOut
HUD Franklin
SwitchHUDTrevorOut
HUD Trevor
SwitchShortFranklinMid
Frank. Mid
SwitchShortMichaelMid
Michael Mid
SwitchShortTrevorMid
Trevor Mid
MPCoronaSwitch
MP Corona
MenuMGHeistIn
Heist
MenuMGTournamentIn
Tournament
MenuMGSelectionIn
Selection
ChopVision
Chop Vision
DMT_flight_intro
DMT Intro
DMT_flight
DMT Flight
DrugsDrivingIn
Drugs In
DrugsDrivingOut
Drugs Out
SwitchOpenNeutralFIB5
FIB Neutral
HeistLocate
Heist Locate
HeistCelebPass
Heist Pass
HeistCelebFail
Heist Fail
Kill Color Picker
7 color options for the marker:
Red
255, 0, 0
Orange
255, 77, 0
Yellow
255, 255, 0
Green
0, 255, 0
Blue
0, 189, 248
Pink
255, 0, 255
White
255, 255, 255
Kill Sounds
Separate toggle from the kill effect itself — you can have sounds without visuals or vice versa. Off by default.
18 sounds available (
ks1throughks18)Selecting a sound plays it as a preview
Volume slider: 0–100
Server owner can cap max volume with
Config.MaxKillSoundVolumeAudio plays through the NUI browser layer
Hit Effect Tab
Triggers when you deal damage to a ped (non-lethal hits).
Hit Toggle
Master switch. Off by default.
Detection: listens to CEventNetworkEntityDamage. Checks that the attacker is your ped (or a vehicle you're driving) and the victim is another ped. Ignores self-damage.
Hit Style
Two independent sub-toggles:
Particle
Spawns a particle effect at the exact bone that got hit. Uses GetPedLastDamageBone() to find the impact point and spawns the particle there. Auto-stops after particleDuration (0.8 s).
Screen
Plays a screen-wide post-process effect via AnimpostfxPlay().
Hit Screen Effects
10 screen effects, each with a preview thumbnail in the menu
Selecting one plays a 1.5-second preview in-game.
Hit Color Picker
Same 7 colors as the kill effect (Red, Orange, Yellow, Green, Blue, Pink, White).
Particles
20 particle effects. Each one shows a thumbnail in the menu grid. First 10 are shown by default, hit "Show All" for the rest.
When you pick a particle, it plays a 1.2-second preview at your ped's head position.
Heads up: FPS presets (especially Potato and Ultra Low) remove particles in range as part of their optimization. If your hit particles aren't showing, reset FPS settings to Default first.
Hit Sounds
Works the same way as kill sounds. Separate toggle, off by default.
10 sounds available (
hit1throughhit10)Selecting a sound plays a preview
Volume slider: 0–100
Server owner can cap max volume with
Config.MaxHitSoundVolume
Save & Load System
How it works:
Each player is identified by their
license:identifier (:replaced with_in the filename).Settings are stored as JSON files in the
data/folder. Example:data/license_abc123def.jsonIf
Config.AutoSaveOnCloseis on, settings save every time the player closes the menu.If
Config.LoadUserDataOnStartis on, saved settings are loaded when the player joins.There's also a manual cloud save button in the UI (currently hidden, ready for future use).
What gets saved:
Preset, shadow distance, object quality, character quality, vehicle distance, LOD scale, all toggle states, kill effect settings (enabled, style, screen FX, color, sound config), hit effect settings (enabled, style, screen FX, color, particle, sound config).
Commands & Keybinds
/fps
F7
Opens the FPS boost menu
/effects
F6
Opens the kill & hit effects menu
Keys are registered with RegisterKeyMapping() so players can rebind them from the FiveM settings.
Test Ped
When Config.EnableTestPedCommand is true:
/testped
Spawns a godmode + frozen test ped in front of you. Run it again to delete the ped. Useful for testing kill/hit effects without needing another player.
Localization
11 languages included out of the box:
ar
Arabic
de
German
el
Greek
en
English
es
Spanish
fr
French
it
Italian
pl
Polish
pt
Portuguese
ru
Russian
tr
Turkish
Adding a new language: copy any file from locales/, translate the strings, done.
Dependencies
ox_lib
Used for notifications (lib.notify)
Requires Lua 5.4 (
lua54 'yes'in manifest)Requires FiveM cerulean manifest version or newer
Last updated