How to hide gui?

Are you talking about Roblox’s CoreGui for tools and gear, or do you mean a custom Gui that you’ve made yourself?

If it’s the former, you can look into SetCoreGuiEnabled.