I am currently trying to be able to at least access the children inside CoreGui, but it seems running this errors.
print(unpack(game.CoreGui:GetChildren()))
I’m guessing it’s because the LocalScript can’t access the CoreGui’s children, but how are exploiters able to access it and inject GUI to it then? Is there a way to detect when this happens? If there is, how do I do it?
Please use the search function before asking a question, someone may already have the same question as you that was answered before (see: above linked post).
I’ll go ahead and answer your question anyway: no, there isn’t a way to do so. Exploiters run code on higher context levels, something you are not able to do. Do not try detecting this, there is no point in doing so.