[RELEASE] unreadable.gg - Modern Luau Decompiler

Started by xch0nky

xch0nky

Hey all, I'm releasing [URL=https://unreadable.gg]unreadable.gg[/URL], a Luau decompiler I've been working on for the past few months. A decompiler is something I've always wanted to make. After many tries, I think I've finally gotten around to doing it. You can use it on the [URL=https://unreadable.gg]website[/URL], on the [URL=https://discord.gg/8gXdq43sK8]Discord server[/URL] with `/decompile`, in your [URL=https://unreadable.gg/docs/stream#client]executor[/URL], over the [URL=https://unreadable.gg/docs/api]API[/URL], or with your favorite [URL=https://unreadable.gg/docs/agents]agent[/URL]. Loadstring right here for those who want it: ```lua loadstring(game:HttpGet("https://unreadable.gg/decompile.lua"))() ``` You get 100 freebies a day, no signup required. ## Features - Marks what it isn't sure about instead of guessing - The output runs the same as the original, and can even compile back to the exact same bytecode - Whole `.rbxl`/`.rbxm` files, or their XML versions - An LLM names locals and parameters the script lost - Pick a preset, or flip any of [URL=https://unreadable.gg/docs/readability]18 switches[/URL] yourself - Re-rolls loops the compiler unrolled - Type inference - Constant folding, dead code removal and function inlining - Early returns, positive conditions and compound assignment - Upvalue notes on every closure - Bytecode versions `1-14`, at any optimisation and debug level - Works on the website, in your executor, over the API, with the Discord bot and with AI agents (MCP) ## Presets - Use `balanced` if you don't want to think about it. - Use `faithful` if you want stack traces with accurate line numbers, or source that compiles to the same bytes as the bytecode. Just know it may be quite verbose. - Use `readable` if you want the cleanest result. Some variables & functions may be omitted from the output. ## Memberships - Enough decompiles for whole places, which mostly have way more than 100 scripts - 2,048 scripts decompiling in parallel (~1600 scripts/s) - Files up to 8 MiB instead of 2 MiB - Up to 5 minutes per decompile instead of 30 seconds - Pro, Max or Ultra: $5, $10 or $30 per 30 days, for about 12,000, 36,000 or 240,000 scripts a day Details are on the [URL=https://unreadable.gg/account]account page[/URL]. ## Examples **readSheetContentInsets** ```lua const SheetShimTypes = require(script.Parent.SheetShimTypes) const getSheetStructure = require(script.Parent.getSheetStructure) const function readSheetContentInsets(props): {} -- line 7 const sheet = props.sheet const scroller = props.scroller const container = props.container if scroller ~= nil and container ~= nil then const height = scroller.CanvasSize.Y.Offset + container.Position.Y.Offset const parent = sheet.Parent const y = if parent ~= nil and parent:IsA("GuiBase2d") then parent.AbsoluteSize.Y else sheet.AbsoluteSize.Y return { bottom = math.clamp(scroller.CanvasPosition.Y - height, 0, y), right = 0 } end if props.kind == "side" then return { bottom = 0, right = math.clamp(-sheet.Position.X.Offset, 0, sheet.Size.X.Offset) } end return { bottom = 0, right = 0 } end return readSheetContentInsets ``` **getCachedUserDetails** ```lua const function getCachedUserDetails(source, displayName: string) -- line 7 if displayName == "" or type(source) ~= "table" then return nil, nil end const last = string.lower(displayName) for i, entry in source do if type(entry) == "table" then const username = entry.username or entry.userIdentifier if type(username) == "string" and string.lower(username) == last then return tonumber(i), entry.displayName end end end return nil, nil end return getCachedUserDetails ``` **HasPendingLiftRestriction** ```lua const PlatformRestricted = script:FindFirstAncestor("PlatformRestricted") const GetLiftRestrictionConsents = require(PlatformRestricted.Http.Requests.GetLiftRestrictionConsents) return function(scope, duration: number) -- line 8 -- upvalues: GetLiftRestrictionConsents (copy) return GetLiftRestrictionConsents(scope, duration):andThen(function(result) -- line 9 const responseBody = result and result.responseBody const consents = if typeof(responseBody) == "table" then responseBody.consents else nil if typeof(consents) == "table" then for _, entry in ipairs(consents) do const consentData = if typeof(entry) == "table" then entry.consentData else nil if typeof(consentData) == "table" and consentData.restrictionType == "PlatformAccess" then return true end end end return false end, function(): boolean -- line 26 return false end) end ``` Bug reports are welcome on the [URL=https://discord.gg/8gXdq43sK8]Discord server[/URL], especially scripts that come out marked or refused. Thank you! [URL=https://unreadable.gg]Website[/URL] · [URL=https://unreadable.gg/docs]Docs[/URL] · [URL=https://unreadable.gg/changelog]Changelog[/URL] · [URL=https://discord.gg/8gXdq43sK8]Discord[/URL] ![unreadable.gg decompiling](https://unreadable.gg/media/code-cards-forum.gif)

chronics

does the output tell you which scripts can compile back to identical bytecode?

morgan

beautiful ui

xch0nky

> [@pluto wrote:](/thread/83d8e7b6f3af1ba0de361b9c5db3b5a9?post=e381a544bcce1a6a67cd736116d65102#post-e381a544bcce1a6a67cd736116d65102) > Looks really cool. Nice release. Thank you!

xch0nky

> [@chronics wrote:](/thread/83d8e7b6f3af1ba0de361b9c5db3b5a9?post=52f7bdc589694fe527574ea08a8da267#post-52f7bdc589694fe527574ea08a8da267) > does the output tell you which scripts can compile back to identical bytecode? Only partially. Today there are three kinds of answers: - Decompilation is refused entirely (an unknown bytecode format, an OOM or a timeout; otherwise extremely rare on valid code) - Decompilation has markers where it knows the code won't compile to identical bytes - Code with no markers, clean. Code with no markers does not mean proven identical, even though it very likely does round trip identically. Proving it is difficult because we usually don't know the compiler options that were used to produce the input, so they have to be known or inferred. Verifying that the input bytecode recompiles to identical bytes goes like this: Bytecode A -> decompile -> Source B -> compile -> Bytecode B Bytecode A == Bytecode B ? With the wrong options, the Luau compiler may do any number of things that make Bytecode B diverge from Bytecode A, even when Source B is correct. I'm working on this. Soon, code that round trips identically will be guaranteed to, and anything that might not will carry a note saying so. Good question! TLDR: Partially today; output that tells you when it won't round trip identically is what I'm working on right now. Thank you!

xch0nky

> [@morgan wrote:](/thread/83d8e7b6f3af1ba0de361b9c5db3b5a9?post=c446cee3b4da379d8cdf4aed72bb5c91#post-c446cee3b4da379d8cdf4aed72bb5c91) > beautiful ui thanks bro 💯

epries

Pretty good decompiler but why even charge for an api like this?