Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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)

5 comments

0

Pretty close but I found an EZ hak 4 this. I'm posting it as the answer in a second lol

0

As in a life hack oops lol

0

I'll accept your question as the answer since it is the best and it gave me the idea to try my answer.

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.

0

As stated in the ROBLOX wiki, the CoreGui can only be indexed by CoreScripts, Plugins and the Command Bar.

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

1 comment

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.