void Update() { if (Input.GetButtonDown("GameMenu")) { if (isMenuOpen) { isMenuOpen = false; Screen.lockCursor = true; movementController.inMenu = false; weaponController.EnableWeapons(); } else { isMenuOpen = true; Screen.lockCursor = false; movementController.inMenu = true; weaponController.DisableWeapons(); } } if (Input.GetButtonDown("Scoreboard") && !finalScoreboardOpen) { if (isScoreboardOpen) { isScoreboardOpen = false; } else { isScoreboardOpen = true; } } }