How do i diable the mouselook movement when i press ESC

Hey guys, i am very, very new to unity and have no knowledge in coding but i am just starting to learn a little bit.

I currently work in the engineering / construction industry and have decided to experiment Unity to showcase my designs and its going very very well so far. But i have ran into a problem that i would like some help on. So currently i have setup my FPS shooter to showcase my engineering designs and walk around. i also have bought a material changer which allows me to change the material on furniture, flooring, structural items, My problem is when i go to click the GUI button to change the colour my camera moves and i lose sight of the object when it changes color. I searched the internet and it seems i have to modify the mouse look script. Can you guys please help me out to what values i have to change and add to make sure sure when i press the ESC button my movement stops and i can select my gui button… Thanks for any info you guys provide. Appreciate it!

in your update loop you can do something like this

    private bool isPaused = false;

    void Update()
        //check if the escape key is pressed
        if (Input.GetKeyDown(KeyCode.Escape))
            //pause logic

            //is the game paused
            if (isPaused == false)
                //set the time scale to 0, so nothing moves
                Time.timeScale = 0;
                //set the boolean to true as now the game is paused
                isPaused = true;
            //else if isPaused == true
                //set the time scale to 1, so the game resumes
                Time.timeScale = 1;
                //set the boolean to true as now the game is resumed
                isPaused = false;

        //Your other update code here

the mouse appears and reapper when i press the esc key but it doesnt stop any movement