> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# decompile

> يفك decompile لسكربت Roblox ويرجع source text الناتج عندما يكون bytecode متاحا. يجب أن يكون argument عبارة عن script Instance مدعوم. إذا لم يتوفر bytecode قابل للاستخدام، ترجع function nil.

<div className="real-function-page">
  ```lua theme={null}
  decompile(script: userdata): string | nil
  ```

  ## الوسائط

  <ParamField path={"script"} type={"userdata"} required>
    Script object المطلوب decompile له. قيم ClassName المدعومة هي ModuleScript و LocalScript و CoreScript و Script مع RunContext Client.
  </ParamField>

  ## القيم الراجعة

  <ResponseField name={"source"} type={"string | nil"}>
    Decompiler output string أو caught decompiler exception text أو nil عندما لا يتوفر usable embedded bytecode.
  </ResponseField>

  ## مثال

  Decompile a supported Roblox script Instance. To decompile a whole game, iterate its descendants or use a saveinstance workflow.

  ```lua theme={null}
  local targetScript

  for _, descendant in ipairs(game:GetDescendants()) do
      if descendant:IsA("LuaSourceContainer") then
          targetScript = descendant
          break
      end
  end

  if targetScript then
      local source = decompile(targetScript)

      if source then
          print(source)
      end
  end
  ```
</div>
