pause button is not working

when i press pause, the sprite stops moving but he can turn left and right, and when you press the shoot button the sprite shoots but bullet is not moving.
here is my script:

using UnityEngine;

public class PauseGame : MonoBehaviour
{
bool isPaused = false;

void OnGUI()
{
    if (isPaused)
        GUI.Label(new Rect(100, 100, 50, 30), "Game paused");
}

void OnApplicationFocus(bool hasFocus)
{
    isPaused = !hasFocus;
}

void OnApplicationPause(bool pauseStatus)
{
    isPaused = pauseStatus;
}

}

could you please give me a script that will work?

If youre looking for any way to pause simply do this:

private bool paused = false;
public GameObject pause_panel;//this is the pause menu.

    private void Update()
    {
        if(Input.GetKeyDown(KeyCode.Escape))
        {
            if (paused)
            {
                paused = false;
                pause_panel.SetActive(false);
                Time.timeScale = 1f;
            }
            else
            {
                paused = true;
                pause_panel.SetActive(true);
                Time.timeScale = 0f;
            }
        }
    }

@ZozeR sorry it was the wrong script i copied^^

timescale 1 and 0 is not working i need another thing indeed my sprite stops moving but he turns left and right he can shoot but the bullet don’t move