How do I check if a GUI is on screen?

Show me where you are using it because it works perfectly fine for me