Detect if a player is in their escape screen/menu

Heyoo

Was wondering if anyone knows how to detect if a player is in their escape menu.

gui.IsGameUIVisible

Thank you very much <3