How do you detect dark dex?

You cannot do anything in CoreGui from a normal script, the security check will always fail