Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to use IsA or .ClassName on a RobloxLocked object?

Asked by
Hexcede 52
6 years ago

I am developing a very small anticheat and I'd like to know if it would be possible to check the class of a RobloxLocked object. I don't want to post the details on the anticheat for obvious reasons but here's a snippet of the code I'm trying to use:

if object:IsA("LocalScript") or object:IsA("CoreScript") then
    -- Detection stuff
end

I do not want to use pcall because it would be easy for an exploiter to get around that by RobloxLocking the script.

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

You can't. However, you can do

tostring(RobloxLockedObject)

to check its name.

If you're trying to patch CoreGui exploits, it would be something like:

local Bad = {
    "Dex",
}

local function CheckIfLocked(Object)
    local Status = pcall(function()
        Object:GetFullName()
    end)

    return Status and false or not Status and true
end

local function CheckIfBad(Name)
    for I, V in next, Bad do
        if V == Name then
            return true
        end
    end
    return false
end

game.DescendantAdded:Connect(function(Object)
    if CheckIfLocked(Object) and CheckIfBad(tostring(Object)) then
        --// Detected
    end
end)

Through some crafty mechanics and thinking, you can get the ClassName of the RobloxLocked object if it's picked up in the game.DescendantAdded event. (It's really easy)

0
Pretty close but I found an EZ hak 4 this. I'm posting it as the answer in a second lol Hexcede 52 — 6y
0
As in a life hack oops lol Hexcede 52 — 6y
0
I'll accept your question as the answer since it is the best and it gave me the idea to try my answer. Hexcede 52 — 6y
0
Welp I checked my answer again and because I tested in the command bar it didn't error so my answer won't work anyway... Yours is still the best though so I'll keep it as the answer... I don't think there is a valid answer either. Hexcede 52 — 6y
0
As stated in the ROBLOX wiki, the CoreGui can only be indexed by CoreScripts, Plugins and the Command Bar. Naxxanar 77 — 6y
Ad
Log in to vote
0
Answered by
spr_ead 47
6 years ago

You can't, you could before using Plugins, but is now disabled.

0
Thanks for the answer but please don't tell me I can't... If the question isn't possible I'd rather have nobody answer than get an unhelpful one. Hexcede 52 — 6y

Answer this question