---
title: "Scripts"
description: "Script bytecode, environments, closures, and GC objects."
icon: "file-code"
---

## Available functions

<div className="byte-function-directory">
<CardGroup cols={2}>
  <Card title="decompile" href="/reference/scripts/decompile">
    Reads bytecode and submits it to the configured remote decompiler.
  </Card>
  <Card title="filtergc" href="/reference/scripts/filtergc">
    Filters GC objects by function/table criteria; also supports filtergc(predicate).
  </Card>
  <Card title="getcallingscript" href="/reference/scripts/getcallingscript">
    Walks call frames looking for a non-nil script environment value.
  </Card>
  <Card title="getgc" href="/reference/scripts/getgc">
    Collects live functions, threads, userdata, lightuserdata, and buffers, optionally including tables, from this VM.
  </Card>
  <Card title="getloadedmodules" href="/reference/scripts/getloadedmodules">
    Finds unique ModuleScript values in live function environments.
  </Card>
  <Card title="getrunningscripts" href="/reference/scripts/getrunningscripts">
    Finds script instances associated with live VM threads.
  </Card>
  <Card title="getscriptbytecode" href="/reference/scripts/getscriptbytecode">
    Reads and decodes available script bytecode.
  </Card>
  <Card title="getscriptclosure" href="/reference/scripts/getscriptclosure">
    Loads available script bytecode into a new closure without executing it.
  </Card>
  <Card title="getscriptfromthread" href="/reference/scripts/getscriptfromthread">
    Reads a thread's associated script.
  </Card>
  <Card title="getscripts" href="/reference/scripts/getscripts">
    Finds live script userdata visible to the current VM.
  </Card>
  <Card title="getsenv" href="/reference/scripts/getsenv">
    Finds a matching live thread and returns its globals.
  </Card>
</CardGroup>
</div>

[View types and behavior](/reference/scripts/types)
