How do I make the gameobject pause and unpause on its own in unity3d

I need to make the gameobject pause and unpause by itself in the scene . I was able to pause and unpause the gameobject by key. I need the gameobject to be pause for a couple of seconds and unpause on its own . Here is my script :

using UnityEngine;
using System.Collections;

public class hu : MonoBehaviour {
GameObject[] pauseObjects;
	// Use this for initialization
	void Start () {
	Time.timeScale = 1;
	pauseObjects = GameObject.FindGameObjectsWithTag("Player");

	}
	
	// Update is called once per frame
	void Update () {
	
		{
			if(Time.timeScale == 8)
			{
				Time.timeScale = 0;
				
			} else if (Time.timeScale == 0){
			
				Time.timeScale = 1;
				
			}
	}
}
}

You’ll want to look into coroutines and then also need another manager to watch when to turn the object back on . The learning tutorials have several good examples, don’t have to watch tutorials you should be able to look for things like IEnumerator to get to the sections of the displayed code that you want, probably even a tutorial specifically on corroutines .
Probably also want to look into enable and disable of object the roller 2d examples with the sphere has some good examples.

here is some code example with a coroutine:
public class ScrGameController : MonoBehaviour {

public float startWaitSeconds;
public float waveWaitSeconds;
public float spawnAsteroidsWaitSeconds;
public int asteroidHazardCt;
public GameObject [] gameHazards;
public GameObject boundaryRef;
public Vector3 spawnValues;
public GUIText txtReadySetGo;
public GUIText txtScore;
public GUIText txtRestart;

private int playerScore;

private bool exitGame;
private bool restartGame;
private bool continueGame;

IEnumerator SpawnWaves(){
    //txtReadySetGo.GetComponent<GUIText>().text = "Ready ! ! !";
    txtReadySetGo.text = "Ready ! ! !";
    yield return new WaitForSeconds(startWaitSeconds);
    //txtReadySetGo.GetComponent<GUIText>().text = "Set ! ! ! !";
    txtReadySetGo.text = "Set ! ! ! !";
    yield return new WaitForSeconds(startWaitSeconds);
    //txtReadySetGo.GetComponent<GUIText>().text = "Go ! ! ! ! !";
    txtReadySetGo.text = "Go ! ! ! ! !";
    yield return new WaitForSeconds(startWaitSeconds-0.5f);
    //txtReadySetGo.GetComponent<GUIText>().text = "";
    txtReadySetGo.text = "";

    while (true){
        for (int i = 0; i < asteroidHazardCt; i++)
        {
            GameObject hazard = gameHazards[Random.Range(0, gameHazards.Length)];
            Instantiate(hazard, new Vector3(Random.Range(-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z), Quaternion.identity);
            yield return new WaitForSeconds(spawnAsteroidsWaitSeconds);
        }

        if (!continueGame)
        {
            break;
        }

        yield return new WaitForSeconds(Random.Range(0.5f,waveWaitSeconds));
    }

    if (!continueGame)
        restartGame = true;
}

// Use this for initialization
void Start () {

    //initialize game variables
    startWaitSeconds = 1.0f;
    waveWaitSeconds = 3.0f;
    spawnAsteroidsWaitSeconds = 0.5f;
    asteroidHazardCt = 6;

    continueGame = true;
    restartGame = false;
    exitGame = false;

    playerScore = 0;

    txtReadySetGo.text = "";
    txtScore.text = "";
    txtRestart.text = "";

    UpdateScoreDisplay();

    StartCoroutine(SpawnWaves());
}

// Update is called once per frame
void Update () {
    if (restartGame == true)
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            //depracated is Application.LoadLevel(Application.LoadedLevel)

            restartGame = false;
            continueGame = true;

            ReplayLevel01();
        }
        else {
            if (Input.GetKeyDown(KeyCode.E))
            {
                Application.Quit();
            }
        }
    }
}

public void GameOver()
{
    txtReadySetGo.GetComponent<GUIText>().text = " Game Over ";
    continueGame = false;
    txtRestart.text = "Restart Game Press \'R\'

Press 'E' to Exit.";
}

public void AddScore(int addedScore)
{
    playerScore += addedScore;
    UpdateScoreDisplay();

}

public void UpdateScoreDisplay()
{
    txtScore.text = "Score: " + playerScore;
}

public void ReplayLevel01()
{
    //calls the active scene
    string sceneName = SceneManager.GetActiveScene().name;

    //loads the active scene
    SceneManager.LoadScene(sceneName, LoadSceneMode.Single);
}

}