---
title: "Scripts types & behavior"
description: "Object fields, option tables, and behavior for Scripts."
---


## filtergc options

| Mode | Option | Contract |
| --- | --- | --- |
| function | Name: string | Match function debug name |
| function | Hash: string | Match Byte function hash |
| function | Constants: table | Required constant values |
| function | Upvalues: table | Required upvalue values |
| function | IgnoreExecutor: boolean | Defaults to true; false includes Byte-owned functions |
| table | Keys: table | Required keys |
| table | Values: table | Required values |
| table | KeyValuePairs: table | Required key/value associations |
| table | Metatable: table | Required metatable identity |

All supplied criteria must pass. Hash/constants/upvalue filters exclude C closures. Function mode writes IgnoreExecutor=true into an options table when that field is nil. Pass a mutable table.

The callback overload is filtergc(function(value) return predicateResult end). It scans with tables included, collects truthy matches, ignores predicate errors, and always returns an array. The third returnOne argument applies only to the string-mode overload.

Scanning GC is synchronous and VM-local. Prefer one bounded scan at setup, retain the values you need, and invalidate your own caches when the environment changes.
