> ## 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.

# dumpstring

> Mengembalikan decompressed bytecode string untuk Roblox script object. dumpstring didaftarkan ke C++ function yang sama dengan getscriptbytecode, jadi perilakunya identik. Argument harus object. bytecode reader bersama menerima nilai ClassName ModuleScript, LocalScript, CoreScript, dan Script. Untuk Script, RunContext harus Client. Jika ClassName hilang, function menghasilkan "Invalid Instance". Jika ClassName bukan script class yang didukung, function menghasilkan "Script expected". Jika nilainya Script dengan RunContext lain, function menghasilkan "Expected a Script with RunContext set to Client". Jika embedded bytecode reference tidak valid atau panjang stored bytecode adalah 8 bytes atau kurang, function mengembalikan nil. Jika tidak, function mendekompresi stored bytecode dengan DecompressBytecode dan mengembalikan resulting bytes sebagai Luau string. Hash mismatch, too-short compressed data, atau ZSTD decompression errors dikembalikan sebagai error text bytes oleh DecompressBytecode, bukan dilempar di sini.

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

  ## Argumen

  <ParamField path={"script"} type={"userdata"} required>
    Script object untuk dibaca. Nilai ClassName yang didukung adalah ModuleScript, LocalScript, CoreScript, dan Script dengan RunContext Client.
  </ParamField>

  ## Return

  <ResponseField name={"bytecode"} type={"string | nil"}>
    Decompressed bytecode bytes sebagai Luau string, DecompressBytecode error text bytes, atau nil jika tidak ada usable embedded bytecode.
  </ResponseField>

  ## Contoh

  Read decompressed bytecode from a supported Roblox script Instance. dumpstring is an alias for getscriptbytecode.

  ```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 bytecode = dumpstring(targetScript)
      print(bytecode)
  end
  ```
</div>
