I made a command-line tool in Java that exports all scripts in an XML Roblox place file. It outputs every script in the place as files in a directory structure that mirrors the game hierarchy. Script objects are exported as .lua, ModuleScripts export as .module.lua, and LocalScripts export as .local.lua. Duplicate names are handled with numbers, ie , , and so on.
How to Export Scripts in a Roblox Place
- First, you will need the following:
- Java Runtime Environment (1.8+)
- Download the command-line tool here and save it as ScriptExport.jar.
- A copy of the place as an rbxlx file. Here’s an example you can download. Note that the rbxlx format is much larger than the default rbxl format, as it uses XML.
- Some skills with using the command line, as the tool does NOT have a user interface!
- Make sure ScriptExport.jar and your rbxlx file are within the same directory. Then, via the command line, run the jar file using Java (assuming you have Java in your PATH environment variable on Windows):
java -jar ScriptExport.jar place.rbxlx
Be sure to change place.rbxlx to your place’s file name.
- Wait for the process to complete. It should take a short while for large projects. Your output will be in a directory called place.rbxlx_export, or something similar to your file name.
Warning: This tool uses Java’s XML parsers, and it is possible to break these if any script in your game has a non-XML character. For example, one of Roblox’s core scripts used in the default chat system has a strange character on CurveUtil.lua’s line 55. Be sure to delete any invalid XML characters, as Roblox will export these without properly escaping them.