A powerful toolset that exports scripts and the full object hierarchy from Roblox place files (.rbxl), making it easy to version control, audit, and manage your Roblox game.
Two complementary tools β use them separately or together:
| Tool | What it exports | Output format |
|---|---|---|
export-scripts.lua |
All Script / LocalScript / ModuleScript source code | .lua / .server.lua / .client.lua files |
export-objects.lua |
Full instance hierarchy with serialized properties | Per-service .json files + manifest.json |
- Complete Script Export: Extracts all Script, LocalScript, and ModuleScript instances from .rbxl files
- Organized Structure: Maintains Roblox service hierarchy (ServerScriptService, ReplicatedStorage, etc.)
- Nested Script Support: Handles scripts inside other scripts with special
_contentsfolders - Rich Metadata: Preserves script properties, paths, and export information in file headers
- Smart File Extensions:
.server.luafor Server Scripts.client.luafor Local Scripts.luafor Module Scripts
- Clean Naming: Sanitizes file and folder names for filesystem compatibility
- Full Hierarchy Export: Every instance in the game tree β Parts, Models, GUIs, Constraints, Lights, Sounds, Values, etc.
- Rich Property Serialization: 50+ classes covered; complex types (Vector3, CFrame, Color3, UDim2, Enums, Sequencesβ¦) are serialized to readable JSON structures
- Modes:
objects(default) β All instances with properties; scripts appear as metadata nodes (no Source)allβ Everything including script Source codeno-scriptsβ Exclude all script nodes entirely
- Class Filtering: Export only specific classes (e.g.
--filter Part --filter MeshPart) - Per-service JSON files + a
manifest.jsonwith stats and top-class breakdown - Top-class statistics: See how many of each instance type are in your game
- Lune - A standalone Luau runtime
- A Roblox place file (.rbxl) to export from
Windows (using Scoop):
scoop install lune
Windows (using Chocolatey):
choco install lune
macOS (using Homebrew):
brew install lune
Linux or manual installation: Download from the Lune releases page
# Basic β creates MyGame-scripts/ lune run export-scripts.lua MyGame.rbxl # Custom output directory lune run export-scripts.lua MyGame.rbxl my-custom-folder
# Default: full hierarchy, scripts as metadata only lune run export-objects.lua MyGame.rbxl # Include script Source code in the JSON too lune run export-objects.lua MyGame.rbxl --mode all # Exclude scripts entirely lune run export-objects.lua MyGame.rbxl --mode no-scripts # Custom output folder lune run export-objects.lua MyGame.rbxl my-objects-folder # Filter to specific classes lune run export-objects.lua MyGame.rbxl --filter Part --filter MeshPart --filter Model # Limit recursion depth lune run export-objects.lua MyGame.rbxl --depth 10
lune run export-scripts.lua MyGame.rbxl MyGame-scripts lune run export-objects.lua MyGame.rbxl MyGame-objects --mode all
Scripts export (export-scripts.lua):
MyGame-scripts/
βββ project-info.lua
βββ ServerScriptService/
β βββ MainScript.server.lua
β βββ Services/
β βββ PlayerManager.lua
β βββ GameManager.lua
βββ ReplicatedStorage/
β βββ Shared/
β βββ Config.lua
β βββ Utilities.lua
βββ StarterPlayer/
βββ StarterPlayerScripts/
βββ ClientMain.client.lua
Objects export (export-objects.lua):
MyGame-objects/
βββ manifest.json # Stats + per-service summary
βββ Workspace.json # Full Workspace tree with properties
βββ ServerScriptService.json
βββ ReplicatedStorage.json
βββ StarterGui.json
βββ Lighting.json
Each JSON node looks like:
{
"name": "SpawnPoint",
"class": "SpawnLocation",
"properties": {
"Size": { "_type": "Vector3", "x": 6, "y": 1, "z": 6 },
"Position": { "_type": "Vector3", "x": 0, "y": 0.5, "z": 0 },
"Color": { "_type": "Color3", "r": 107, "g": 127, "b": 107, "hex": "#6B7F6B" },
"Anchored": true,
"Material": { "_type": "Enum", "enumType": "Material", "value": "SmoothPlastic" }
},
"children": []
}export-scripts.luaβ Exports all scripts as.luafilesexport-objects.luaβ Exports full object hierarchy as JSON (new)rokit.tomlβ Rokit/Lune dependency configuration
Modify the CONFIG table at the top of the file:
local CONFIG = { extensions = { Script = ".server.lua", LocalScript = ".client.lua", ModuleScript = ".lua" }, services = { "ServerScriptService", "ReplicatedStorage", "ServerStorage", "StarterPlayer", -- ... add more services as needed }, skipInstances = { "Camera", "Terrain" } }
All options are CLI flags β no file editing needed:
| Flag | Default | Description |
|---|---|---|
--mode objects |
β | All instances; scripts as metadata (no Source) |
--mode all |
All instances including script Source | |
--mode no-scripts |
Exclude all script instances | |
--filter <Class> |
Only include this ClassName (repeatable) | |
--depth <n> |
50 | Max recursion depth |
The services list and skipInstances can be edited in the CONFIG table inside the file.
- Reads the .rbxl file and deserializes it using Lune's Roblox API
- Traverses each configured service recursively
- Identifies all Script, LocalScript, and ModuleScript instances
- Extracts source code and metadata from each script
- Organizes scripts into a clean directory structure mirroring the Roblox hierarchy
- Preserves script properties in file headers
- Reads & deserializes the .rbxl file
- Traverses all services in the configured list
- Builds a tree of every instance, respecting mode and depth settings
- Serializes properties with full type awareness (Vector3, CFrame, Color3, Enums, UDim2, Sequencesβ¦)
- Writes one
.jsonfile per service plus amanifest.jsonsummary - Reports top-class statistics so you can see what your game is made of
Each exported script includes a comprehensive header with metadata:
--[[ PlayerManager (ModuleScript) Path: ServerScriptService β Services Parent: Services Properties: Disabled: false Exported: 2025-06-27 14:30:15 ]] -- Your script code here...
Contributions are welcome! Here are some ways you can help:
- Bug Reports: Found an issue? Please open an issue with details
- Feature Requests: Have an idea? Let's discuss it in the issues
- Pull Requests: Ready to contribute code? Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
"Module not found" errors
- Ensure Lune is properly installed and in your PATH
- Try running
lune --versionto verify installation
"Permission denied" errors
- Make sure you have write permissions in the output directory
- Try running as administrator on Windows if needed
Empty output or missing scripts
- Check that your .rbxl file isn't corrupted
- Verify the file path is correct
- Some scripts might be in services not included in the CONFIG
- Check existing Issues for similar problems
- Open a new issue with:
- Your operating system
- Lune version (
lune --version) - Error message or unexpected behavior
- Sample .rbxl file (if possible)
This project is licensed under the MIT License - see the LICENSE file for details.
- Lune - For providing an excellent Luau runtime
- Roblox community - For inspiration and feedback
- Contributors - Thank you for making this project better!
- Supports unlimited nesting depth (with safety limits)
- Handles all standard Roblox script types
- Preserves script properties and metadata
- Cross-platform compatible (Windows, macOS, Linux)
Made with β€οΈ for the Roblox development community