Run it
Copy the script and paste it into your executor.
FunctionFilterOptions = {
Name: ?,
Hash: ?,
IgnoreExecutor: boolean?,
Constants: { any }?,
Upvalues: { any }?,
}
TableFilterOptions = {
Metatable: { any }?,
Keys: { any }?,
Values: { any }?,
KeyValuePairs: { [any]: any }?,
}
Function = ((...any) -> (...any))
Table = ({ [any]: any })
ReturnType = Function | Table
info, find, insert = debug.getinfo, .find, .insert
constants, upvalues = debug.getconstants, debug.getupvalues
(func: Function, expected_upvalues: Table, ignore_executor: boolean): boolean
func_upvalues = (func)
#func_upvalues ==
found =
_, value (expected_upvalues)
(func_upvalues, value)
found =
found
(func: Function, expected_constants: Table, ignore_executor: boolean): boolean
(func)
func_constants = (func)
#func_constants ==
found =
_, value (expected_constants)
(func_constants, value)
found =
found
(filter_type: | , filter_options: FunctionFilterOptions | TableFilterOptions, return_one: boolean): ReturnType? | { ReturnType }
.(filter_type) ==
output = {}
specific_name = filter_options.Name
specific_hash = filter_options.Hash
specific_constants = filter_options.Constants
specific_upvalues = filter_options.Upvalues
ignore_executor = filter_options.IgnoreExecutor
ignore_executor ==
ignore_executor =
nothing_provided = specific_name specific_constants specific_upvalues specific_hash
_, value (())
(value) ~= (value)
ignore_executor (value)
function_info = (value)
name = function_info.name
nothing_provided
(output, value)
specific_name name ~= specific_name
specific_hash specific_hash ~= (value)
specific_upvalues function_info.nups ~= (value, specific_upvalues, ignore_executor)
specific_upvalues function_info.nups ==
specific_constants (value, specific_constants, ignore_executor)
(output, value)
return_one
return_one output output[]
.(filter_type) ==
output = {}
specific_keys = filter_options.Keys
specific_values = filter_options.Values
specific_pairs = filter_options.KeyValuePairs
specific_metatable = filter_options.Metatable
max_depth =
nothing_provided = specific_keys specific_values specific_pairs specific_metatable
(tbl: Table, depth: number)
depth > max_depth
nothing_provided
(output, tbl)
matches =
specific_keys
key, _ (tbl)
(specific_keys, key)
matches =
specific_values
_, value (tbl)
(specific_values, value)
matches =
specific_metatable (tbl) == specific_metatable
matches =
specific_pairs
key, value (tbl)
specific_pairs[key] == value
matches =
matches
_, v (tbl)
(v) ==
matches = (v, depth + )
matches
nothing_provided matches nothing_provided
_, tbl (())
(tbl) ~=
is_not_self = tbl ~= specific_keys tbl ~= specific_values tbl ~= specific_pairs
is_not_self
(tbl, )
(output, tbl)
return_one
return_one output output[]
().filtergc = (filtergc)
This is filtergc made in luau. Its not the best implementation of it but still useful for executors that dont have it. Functions required: - getgc (ofc) - debug.getconstants - debug.getupvalues - Updated: [+] fixed upvalues handling [+] made isexecutor to true as default [+] made it return all tables / functions if no arguments are passed into to avoid looking trough the gc for nothing [+] fixed (mostly) table lookup speed [+] improved general speed by around 20% [+] added Hash option to function and Metatable option to table [+] now passes sunc

Universal