Cancelling any other button press

Hey, so im working on a pause script for my c sharp program and I managed to get it to work, however im looking for a way to also cancel other button presses located in other scripts, because even though my charater is paused, the other scripts are still working (if it helps: the buttons i need to cancel are z and x)
heres my current script

using UnityEngine;
using System.Collections;

public class Pause : MonoBehaviour {
public bool paused = false;
// Use this for initialization
void Start () {


// Update is called once per frame
void Update () { 
		paused = !paused; //toggles between paused and not paused
		Time.timeScale = 0;
	else { Time.timeScale = 1; }


just make that paused bool public and only check for the key presses if the PauseScript paused bool is false. So in that other script reference the PauseScript, this assumes you hold the Pause script on the player and it’s called PauseScript:

private PauseScript myPauseScript;

void Start(){
    myPauseScript = GameObject.Find("Player").GetComponent<PauseScript>();

void Update(){
        //check for keypress