FiveM caches all client Lua scripts in memory. You can extract them by:
Memory dumping (advanced):
Using a custom FiveM client (against TOS, for research only): how to dump server files fivem
Alternative: Use FiveM’s built-in dev tools: FiveM caches all client Lua scripts in memory
Some poorly configured servers allow direct HTTP access to resources. Memory dumping (advanced):