Lua -> Player In Console or Mainmenu

Dear facepunch community,

I’ve started to learn gmod lua not to long ago and I’m getting slowly familiar with the API, so far I was able to figure out my problems with all the post in here and the release gamemodes which I would like to thank you all for it.
Is there a way to detect (client side) if the player have the main menu or the console open. I try to search for it but key words popup hundreds of thread that is not what I am looking for, I appologize in advance if it already been asked before.

Sorry for my english,
thank You,

gui.IsConsoleVisible and


Thx allot zerf, I will play around and see if I can get my stuff to work :slight_smile:

Sorry if I did not test sooner, thx allot it work perfectly