saveinstance
Serializes the game DataModel (or a subtree) to an RBXL/RBXLX file.
function saveinstance(options?: table): voidSynopsis
How it works
Serializes the current game’s
DataModel (or a subset) into an .rbxlx / .rbxl file and writes it to the executor’s workspace directory. Traverses the InstanceInstanceThe base class for all Roblox objects (Parts, Models, Scripts, GUIs, etc.). Instances form a tree hierarchy (the DataModel). In Luau, they appear as userdata with shared metatables. hierarchy, encoding properties through Roblox’s XML or binary serialization format, handling references, SharedStrings, and binary data.Options
The options table controls scope and behavior:
mode— "optimized" (default) or "full" serialization depthnoscripts— skipScript/LocalScriptsourcedecompile— attempt to decompile scripts and embed sourcepath— custom output path
Usage
Save full game
saveinstance({
FilePath = "saved_game.rbxlx",
DecompileMode = "sponge",
ShowStatus = true,
})Save workspace only
saveinstance({
FilePath = "workspace_only.rbxlx",
IgnoreList = {"Chat", "Players"},
DecompileMode = "none",
})Parameters
options table optionalConfiguration table. Keys: FilePath (string), DecompileMode (string: "sponge"|"none"), SavePlayers (boolean), ShowStatus (boolean), IgnoreDefaultProps (boolean), IgnoreList (table of class names).
Options
| Key | Type | Default | Description |
|---|---|---|---|
| FilePath | string | "game.rbxlx" | Output file path in the workspace. |
| DecompileMode | string | "sponge" | Script decompilation mode. "sponge" uses the Sponge Decompiler, "none" skips. |
| SavePlayers | boolean | false | Include Player instances and their character models. |
| ShowStatus | boolean | true | Print progress messages to Vindicta console. |
| IgnoreDefaultProps | boolean | true | Omit properties that match their class defaults. |
| IgnoreList | table | {} | Array of class names to exclude from serialization. |
Sponge Decompiler
When DecompileMode is "sponge", scripts are decompiled using Sponge — a Luau decompiler project by malice. It recovers readable source from compiled bytecode.
File Size
Full game saves with decompiled scripts can produce very large files (100MB+). Use IgnoreList and IgnoreDefaultProps to reduce size.