Skip to content
 
 

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game Serializer

An accurate Roblox Binary Format Serializer made in Lua

Disclaimer

Executors are not recommended to use this serializer as is, since is not maintained. I only released this for learning purposes.
It is recommended to wait for someone interested to fork this so they can take over the project and maintain it.
Or if you are interested in maintaining this GitHub repo itself, then please contact me in the community server.

I do not exploit, but found it an interesting challenge to recreate the saveinstance scripts of the day.

How to Use

Assuming you are using it as a module

local serializer = loadstring(game:HttpGetAsync("https://raw.githubusercontent.com/FirTheDeveloper/DexSerializer/refs/heads/main/serializer.lua"))()
serializer.Init()

-- Then we can save
serializer.Save(instance, name, options)

For instance you can put any of the following

  • A single instance to save it and all descendants
  • game to save the whole game to a .rbxl file
  • A table with multiple instances inside it, to save something with multiple roots

The name is optional, if you leave it out it will generate one.

Options

Serializer = {
	-- Decompilation Settings
	Decompile = false,                    -- Decompiles scripts or not
	DecompileTimeout = 10,                -- Timeout before giving up decompiling a script (seconds)
	MaxThreads = 3,                       -- Number of parallel decompilation threads
	DecompileIgnore = {"Chat","CoreGui","CorePackages"},  -- Services to ignore
	SaveBytecode = false,                 -- Include bytecode in output (if available)
	SaveScriptCache = false,              -- Cache decompiled scripts
	
	-- Instance Selection
	NilInstances = false,                 -- Include nil instances
	Decompile = false,                    -- Decompiles or not
	RemovePlayerCharacters = true,        -- Remove player characters
	SavePlayers = false,                  -- Save player instances if saving game
	IsolateStarterPlayer = true,          -- Isolate StarterPlayer for playtesting
	IsolateLocalPlayer = false,           -- Isolate local player
	SavePlayerCharacters = false,         -- Include player character models
	
	-- Property Filtering
	IgnoreDefaultProps = true,            -- Ignore default properties (reduces file size)
	IgnoreNotArchivable = true,           -- Skip non-archivable instances
	
	-- Output Settings
	Binary = true,                        -- Use binary format (.rbxl/.rbxm) instead of XML
	ShowStatus = true,                    -- Display status in top-left corner
	ReadMe = true,                        -- Include helpful README in save
	Mode = "full",                        -- "full", "scripts", or "models"
	FilePath = false,                     -- Custom file path
	Callback = false,                     -- Callback function after saving (receives binary data)
	Clipboard = false,                    -- Copy to clipboard instead of file
	AvoidFileOverwrite = true,            -- Ask before overwriting existing files
	
	-- Safety Features
	SafeMode = false,                     -- Kick before saving for safety (recommended for production)
	BoostFPS = false,                     -- Disable rendering to boost FPS during save
	KillAllScripts = false,               -- Kill all scripts before saving
	AntiIdle = false,                     -- Prevent idle timeout during long saves
	
	-- Data Cleanup
	Anonymous = false                     -- Remove personal data like player names/IDs
}

Mode Options

  • "full": Save everything (default)
  • "scripts": Only save scripts (forces Decompile=true)
  • "models": Save models without scripts (forces Decompile=false)

If Callback or Clipboard is set, it does that instead of writing to a file.

Usage Examples

Basic Save

serializer.Save(game)

Save Only Scripts (Auto-Decompile)

serializer.Save(game, "GameScripts", {
	Mode = "scripts",
	ShowStatus = true,
	MaxThreads = 4
})

Safe Mode (Recommended for Production)

serializer.Save(game, "SafeBackup", {
	SafeMode = true,        -- Kicks you before saving
	BoostFPS = true,        -- Improves performance
	AntiIdle = true,        -- Prevents timeout
	DecompileTimeout = 15
})

Export Specific Model

serializer.Save(workspace.MyModel, "model_export", {
	Mode = "models",
	Binary = true,
	IgnoreDefaultProps = true
})

Anonymize Save (Remove Personal Data)

serializer.Save(game, "Anonymous", {
	Anonymous = true,
	RemovePlayerCharacters = true,
	SavePlayers = false
})
  • For gethiddenproperty, support
    • BinaryString
    • SharedString (return the raw binary value that is shared)
    • Color3uint8 (this property is on BasePart and it is what gets serialized for part colors)
    • Vector3int16 (used in TerrainRegion)
  • have lz4 compress function
  • have a clipboard function that sets to application/x-roblox-studio (for reference, copy something in studio and use clipboard viewer to see how its saved)

Suggested Improvements

Here are some sugggestions for those interested in maintaining this script: - Would also be nice if you can work with executor devs to make sure their gethiddenprop function supports all value types that can be serialized.

  • Possibly clean it up

Known Issues

  • None :3

Made by Moon (based on Dex Serializer), edited by FirXD.

About

An accurate Roblox Binary Format Serializer made in Lua

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages