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

# Scripts

> Komut dosyası, bayt kodu ve ortam sorguları.

<div className="real-category-page">
  Komut dosyası, bayt kodu ve ortam sorguları.

  ## Kullanılabilir fonksiyonlar

  <CardGroup cols={2}>
    <Card title="decompile" href="./decompile">
      Bir Roblox script decompile eder ve bytecode mevcutsa üretilen source text değerini döndürür. argument desteklenen bir script Instance olmalıdır. Kullanılabilir bytecode yoksa function nil döndürür.
    </Card>

    <Card title="dumpstring" href="./dumpstring">
      Roblox script object icin decompressed bytecode string dondurur. dumpstring, getscriptbytecode ile ayni C++ function uzerine register edilir, bu nedenle davranisi aynidir. argument object olmalidir. Ortak bytecode reader ModuleScript, LocalScript, CoreScript ve Script ClassName degerlerini kabul eder. Script icin RunContext Client olmalidir. ClassName eksikse function "Invalid Instance" uretir. ClassName desteklenen script class degilse "Script expected" uretir. Deger baska bir RunContext kullanan Script ise "Expected a Script with RunContext set to Client" uretir. embedded bytecode reference gecersizse veya stored bytecode uzunlugu 8 bytes ya da daha azsa function nil dondurur. Aksi halde stored bytecode DecompressBytecode ile decompress edilir ve resulting bytes Luau string olarak dondurulur. Hash mismatch, too-short compressed data veya ZSTD decompression errors burada throw edilmek yerine DecompressBytecode tarafindan error text bytes olarak dondurulur.
    </Card>

    <Card title="getcallingscript" href="./getcallingscript">
      current Luau thread object uzerinde saklanan script degerini dondurur. Function arguments kabul etmez. stored reference olan the current thread script degerini okur. Bu stored reference expired degilse function script Instance degerini Instance cache ile push eder ve dondurur. stored reference expired ise function nil dondurur. Function Lua call stack incelemez, ancestor scripts aramaz ve script ClassName kontrol etmez.
    </Card>

    <Card title="getinstancesbyclass" href="./getinstancesbyclass">
      Instance cache table icinden ClassName field degeri istenen string ile exact eslesen instances dondurur. Ilk argument string type checking ile okunur. Empty string "ClassName required" uretir. Function yeni bir array table olusturur, Instance cache altinda saklanan cache icinde iterasyon yapar, yalnizca Lua type degeri object olan values degerlerini tutar, her object value icin ClassName field okur ve istenen className ile strcmp kullanarak karsilastirir. Matches index 1 ile baslayarak sequential eklenir. Match exact ve case-sensitive olur. Function IsA kullanmaz, subclasses dahil etmez, walk descendants yapmaz, Parent ile filter yapmaz ve result sort etmez. getinstancesofclass ayni function icin alias degeridir.
    </Card>

    <Card title="getloadedmodules" href="./getloadedmodules">
      Returns a new array table containing live entries from loaded module list. The optional excludeCore argument is read with optional boolean handling and defaults to true when omitted or nil. If excludeCore is true, entries whose instance is a descendant of core packages or CoreGui are skipped. Expired weak entries and locked stored references without a value are skipped. The function pushes each remaining entry with Instance cache at sequential array indexes starting at 1. The function does not check ClassName, does not sort the result, and does not walk the DataModel.
    </Card>

    <Card title="getmenv" href="./getmenv">
      Returns the environment table associated with a ModuleScript. The argument must be a ModuleScript object. Invalid objects raise "Invalid Instance", non-ModuleScript objects raise "ModuleScript expected", and ModuleScripts without an available thread raise "invalid thread". The function does not accept Script or LocalScript; use getsenv for those cases.
    </Card>

    <Card title="getreferencedby" href="./getreferencedby">
      Returns cached Instance values whose supported reference properties point to the provided Instance. The argument must be an Instance.
    </Card>

    <Card title="getrunningscripts" href="./getrunningscripts">
      Live Lua threads icinden alinan unique script Instances iceren yeni bir array table dondurur. Function arguments almaz. the live Luau thread list uzerinden gecer, her thread node degerini okur ve thread node, weak thread ref, LiveLuaRef, Lua state, object olmayan ya da expired Script stored reference iceren entries degerlerini atlar. Kalan her thread icin scriptThread->object->Script() lock edilir, script reference ile deduplicate edilir, Instance Instance cache ile push edilir ve 1 den baslayan sirali array indexes icine eklenir. Function DataModel taramaz, ClassName kontrol etmez ve result siralamaz.
    </Card>

    <Card title="getscriptbytecode" href="./getscriptbytecode">
      Roblox script object icin decompressed bytecode string dondurur. getscriptbytecode, dumpstring ile ayni C++ function uzerine register edilir, bu nedenle davranisi aynidir. argument object olmalidir. Ortak bytecode reader ModuleScript, LocalScript, CoreScript ve Script ClassName degerlerini kabul eder. Script icin RunContext Client olmalidir. ClassName eksikse function "Invalid Instance" uretir. ClassName desteklenen script class degilse "Script expected" uretir. Deger baska bir RunContext kullanan Script ise "Expected a Script with RunContext set to Client" uretir. embedded bytecode reference gecersizse veya stored bytecode uzunlugu 8 bytes ya da daha azsa function nil dondurur. Aksi halde stored bytecode DecompressBytecode ile decompress edilir ve resulting bytes Luau string olarak dondurulur. Hash mismatch, too-short compressed data veya ZSTD decompression errors burada throw edilmek yerine DecompressBytecode tarafindan error text bytes olarak dondurulur.
    </Card>

    <Card title="getscriptclosure" href="./getscriptclosure">
      Loads the stored bytecode for a supported Roblox script Instance and returns it as a Lua closure. Returns nil when usable bytecode is not available.
    </Card>

    <Card title="getscripthash" href="./getscripthash">
      Bir Roblox script object icindeki stored bytecode string icin uppercase SHA384 hex digest dondurur. Argument object olmalidir. Ortak bytecode reader, ModuleScript, LocalScript, CoreScript ve Script ClassName degerlerini kabul eder. Script icin RunContext Client olmalidir. ClassName eksikse function "Invalid Instance" firlatir. ClassName desteklenen script classes icinde degilse "Script expected" firlatir. Deger farkli RunContext iceren bir Script ise "Expected a Script with RunContext set to Client" firlatir. Embedded bytecode reference gecersizse veya stored bytecode uzunlugu 8 bytes ya da daha azsa function nil dondurur. Aksi halde tam stored bytecode bytes degerini SHA384 ile hash eder ve uppercase hex string dondurur. Function DecompressBytecode cagirmaz ve decompressed bytecode hash etmez.
    </Card>

    <Card title="getscripts" href="./getscripts">
      Instance cache icinde su anda bulunan script object degerlerini dondurur. Function arguments almaz. Instance cache altinda saklanan cache uzerinde gezer ve yalnizca value object olan entries degerlerini inceler. Her value icin ClassName field degerini optional string handling ile okur. LocalScript ve ModuleScript entries dahil edilir. Script entries yalnizca RunContext offset CLIENT veya PLUGIN degerine esit oldugunda dahil edilir. Diger ClassName degerleri, string ClassName olmayan entries ve CoreScript entries atlanir. Sonuc sirali bir Luau table olur. Function DataModel uzerinde gezmez ve sorted order garanti etmez.
    </Card>

    <Card title="getscriptthread" href="./getscriptthread">
      Real bulabildiginde bir script object ile iliskili Lua thread degerini dondurur. Argument object olmalidir. Function degerin ClassName field degerini okur ve bu field string degilse "not a valid Instance" firlatir. Kabul edilen ClassName degerleri Script, LocalScript ve ModuleScript degerleridir; diger degerler "Script expected" firlatir. Once script reference ile Real'in ScriptThreadCache degerini kontrol eder. Cache hit durumunda cached Luau thread degerini thread olarak dondurur. Cache miss durumunda Script degerleri RunContext Client icermelidir, aksi halde function "Expected a Script with RunContext set to Client" firlatir. Sonra the live Luau thread list uzerinde gezer, her thread node icin first weak thread reference degerinden LiveLuaRef degerine gider, missing thread data veya expired Script stored references degerlerini atlar ve her script reference degerini istenen script ile karsilastirir. Match bulursa bu Luau thread degerini thread olarak dondurur. Match bulunmazsa nil dondurur.
    </Card>

    <Card title="getsenv" href="./getsenv">
      Returns the environment table associated with a LocalScript, Script, or ModuleScript. Unsupported script objects or scripts without an available thread raise the same errors as the underlying script lookup.
    </Card>

    <Card title="loadstring" href="./loadstring">
      Compiles a Luau source string and returns the loaded function. If loading fails, it returns nil and an error message. The returned function is not executed automatically.
    </Card>
  </CardGroup>
</div>
