Why would the developer console be private? Anyways here is a topic: Hiding the Developer Console if it's opened
Note that an exploiter will just disable your script that disables the dev console though. If this is an anti exploit attempt. Hiding it prevents legitimate players from reporting any errors they find from your local scripts.