Universal Script πŸ“Œ
5.2k Views
470 Executions

AntiCrash

Universal Script πŸ“Œ
exserdashdev
exserdashdevPublished 10
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

anti adonis crash, anticrash anti infinite while loops

View Raw
local RunService = game:GetService("RunService")

RunService.Heartbeat:Connect(function()
    task.wait()
    for _, obj in next, getgc(true) do
        if type(obj) == "function" and islclosure(obj) then
            local constants = debug.getconstants(obj)
            local hasTaskWait = false

            for _, cnst in next, constants do
                if cnst == "task.wait" then
                    hasTaskWait = true
                    break
                end
            end

            if not hasTaskWait then
                setfenv(obj, setmetatable({}, {__index = function() return false end}))
            end
        end
    end
end)


Comments

4
Log in to join the conversation. Login
exserdashdev's profile picture
exserdashdevUploader2 years ago

you can modify it

1
picardaladrian96's profile picture
picardaladrian962 years ago

Error all😭

1
L0stVeil's profile picture
L0stVeil2 years ago

please dont spam task.wait, it lags the game so bad causes to break roblox scripts

1
exserdashdev's profile picture
exserdashdevUploader2 years ago

forgot task.wait()

1