GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - patangation/roblox-script-exporter: Extract and organize Lua scripts from Roblox place files (.rbxl) using Lune runtime

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
export-objects.lua
export-objects.lua
 
 
export-scripts.lua
export-scripts.lua
 
 
rokit.toml
rokit.toml
 
 

Repository files navigation

Roblox Script & Object Exporter

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

πŸš€ Features

export-scripts.lua

  • 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 _contents folders
  • Rich Metadata: Preserves script properties, paths, and export information in file headers
  • Smart File Extensions:
    • .server.lua for Server Scripts
    • .client.lua for Local Scripts
    • .lua for Module Scripts
  • Clean Naming: Sanitizes file and folder names for filesystem compatibility

export-objects.lua (new)

  • 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 code
    • no-scripts β€” Exclude all script nodes entirely
  • Class Filtering: Export only specific classes (e.g. --filter Part --filter MeshPart)
  • Per-service JSON files + a manifest.json with stats and top-class breakdown
  • Top-class statistics: See how many of each instance type are in your game

πŸ“‹ Prerequisites

  • Lune - A standalone Luau runtime
  • A Roblox place file (.rbxl) to export from

Installing Lune

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

🎯 Usage

Export scripts (.lua files)

# Basic β€” creates MyGame-scripts/
lune run export-scripts.lua MyGame.rbxl

# Custom output directory
lune run export-scripts.lua MyGame.rbxl my-custom-folder

Export objects (JSON hierarchy)

# 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

Export everything at once

lune run export-scripts.lua MyGame.rbxl MyGame-scripts
lune run export-objects.lua MyGame.rbxl MyGame-objects --mode all

Example output structure

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": []
}

πŸ“‚ Project Structure

  • export-scripts.lua β€” Exports all scripts as .lua files
  • export-objects.lua β€” Exports full object hierarchy as JSON (new)
  • rokit.toml β€” Rokit/Lune dependency configuration

πŸ”§ Configuration

export-scripts.lua

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" }
}

export-objects.lua

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.

πŸ—οΈ How It Works

export-scripts.lua

  1. Reads the .rbxl file and deserializes it using Lune's Roblox API
  2. Traverses each configured service recursively
  3. Identifies all Script, LocalScript, and ModuleScript instances
  4. Extracts source code and metadata from each script
  5. Organizes scripts into a clean directory structure mirroring the Roblox hierarchy
  6. Preserves script properties in file headers

export-objects.lua

  1. Reads & deserializes the .rbxl file
  2. Traverses all services in the configured list
  3. Builds a tree of every instance, respecting mode and depth settings
  4. Serializes properties with full type awareness (Vector3, CFrame, Color3, Enums, UDim2, Sequences…)
  5. Writes one .json file per service plus a manifest.json summary
  6. Reports top-class statistics so you can see what your game is made of

πŸ“ Script Headers

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...

🀝 Contributing

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:
    1. Fork the repository
    2. Create a feature branch (git checkout -b feature/amazing-feature)
    3. Commit your changes (git commit -m 'Add amazing feature')
    4. Push to the branch (git push origin feature/amazing-feature)
    5. Open a Pull Request

πŸ› Troubleshooting

Common Issues

"Module not found" errors

  • Ensure Lune is properly installed and in your PATH
  • Try running lune --version to 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

Getting Help

  • 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)

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Lune - For providing an excellent Luau runtime
  • Roblox community - For inspiration and feedback
  • Contributors - Thank you for making this project better!

πŸ“Š Stats

  • 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

About

Extract and organize Lua scripts from Roblox place files (.rbxl) using Lune runtime

Topics

cli-toolgame-developmentlualunerbxlrobloxscript-extractionsource-control

Resources

Readme
MIT license

Contributing

Contributing
Activity

Stars

8 stars

Watchers

0 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.