Using the Decompiler

Synapse X includes another powerful tool to help you develop scripts - the decompiler. The decompiler allows you to see the full Lua source code of any game LocalScript or ModuleScript, allowing you to easily understand how a game works.

To start, you can execute the Script Dumper from the Synapse X Script Hub. After that, it may take 5-10 minutes for all scripts on the game to decompiled, which will then be placed in your Synapse X workspace folder. You can then open up the file and take a look at all game scripts.

An example of a decompiled script is shown below:

-- Decompiled with the Synapse X Luau decompiler.

function CreateGui()
	local v1 ="ScreenGui");
	local v2 ="Frame");
	local v3 ="Frame");
	local v4 ="TextLabel");
	local v5 ="TextBox");
	local v6 ="Frame");
	local v7 ="Frame");
	local v8 ="TextButton");
	local v9 ="TextLabel");
	local v10 ="TextLabel");
	local v11 ="ImageLabel");
	local v12 ="Frame");
	local v13 ="Frame");

You may notice that decompiled output looks a lot different from the original source of that script - this is because of debugging information being irrevocably lost during the compilation process. Synapse does its best to make the decompiled source look as good as possible, but unfortunately decompilation is mostly a guessing game, which will inevitably lead to differences in the decompiled output.

If you find specific issues within the decompiler, we would recommend you report them via our Bug Report category on our support site.

Nonetheless, the decompiler is a powerful tool in your arsenal, which we will put to use in our next section, using the debug API.