local script:
if game.CoreGui:FindFirstChildOfClass("LocalScript") then game.ReplicatedStorage["anti exploit"]:FireServer() end
With CoreGui you are really limited with what you can do.
CoreGui does not have allow you to perform a lot of operations on it, as ROBLOX has disabled them due to keeping consistency on all their games.
However this doesn't mean you can't access CoreGui, but you can only perform a few limited functions on it.
You can enable/disable certain aspects of the GUI, as seen here (e.g. Backpack, the chat window):
https://developer.roblox.com/en-us/api-reference/function/StarterGui/SetCoreGuiEnabled
But for other aspects you can only set them to be transparent or not:
https://developer.roblox.com/en-us/api-reference/function/PlayerGui/SetTopbarTransparency
However with what you're trying to do ROBLOX does not allow you to look/change for anything inside of the CoreGui.