Universal Script 📌
4.9k Views
86 Executions

filtergc

Universal Script 📌
Verified
Verified
Verified Badge
Verified User
10 followers
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

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

View Raw
type FunctionFilterOptions = {
    Name: string?, 
    Hash: string?,
    IgnoreExecutor: boolean?,
    Constants: { any }?,
    Upvalues: { any }?,
}

type TableFilterOptions = {
    Metatable: { any }?,
    Keys: { any }?,
    Values: { any }?,
    KeyValuePairs: { [any]: any }?,
}

type Function = ((...any) -> (...any))
type Table = ({ [any]: any })
type ReturnType = Function | Table

local info, find, insert = debug.getinfo, table.find, table.insert
local constants, upvalues = debug.getconstants, debug.getupvalues


local function filter_upvalues(func: Function, expected_upvalues: Table, ignore_executor: boolean): boolean
    
    local func_upvalues = upvalues(func)
    if #func_upvalues == 0 then return false end 

    local found = false 
    for _, value in pairs(expected_upvalues) do 
        if not find(func_upvalues, value) then continue end 

        found = true 
        break  
    end 
    return found 
end 

local function filter_constants(func: Function, expected_constants: Table, ignore_executor: boolean): boolean
    if iscclosure(func) then return false end 


Comments

4
Log in to join the conversation. Login
tiam's profile picture
tiam2 years ago(edited)

bro said ip logger

1
ComeOnSyntax's profile picture
ComeOnSyntax2 years ago(edited)

what does this do?

1
deadgothbo11's profile picture
deadgothbo112 years ago(edited)

doesnt work

1
deadgothbo11's profile picture
deadgothbo112 years ago(edited)

ip logger maybe

-2

More universal scripts

See all
Universal Script 📌
9.8k
60.7k
Bumped 12 minutes ago
Key System
Universal Script 📌
3.9k
10.4k
Bumped 13 minutes ago
Script hub
272.5k
884.6k
Bumped 31 minutes ago
Key System

Script hub

#16 this week

Verified script badgeAxon Hub 60+ Games & 800+ Features

Script hub
30.3k
92.0k
Bumped 5 hours ago
Key System

Script hub

#2 this week

Verified script badgeArcane Hub | 125+ Games & 4000+ Features