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.

5 comments
Pretty close but I found an EZ hak 4 this. I'm posting it as the answer in a second lol
As in a life hack oops lol
I'll accept your question as the answer since it is the best and it gave me the idea to try my answer.
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.
As stated in the ROBLOX wiki, the CoreGui can only be indexed by CoreScripts, Plugins and the Command Bar.