How can i convert a game with multiple scene into a single scene game?

I have made a game in unity which have multiple scenes of different level in which user have to select a colored block to go the next level but i want my code to be in a single scene is there a way i can convert my multi scene game into a single scene . Code for level 1 grid base is

public IEnumerator Start() {
        grid = new GameObject[ySize, xSize];
        float x = xStart;
        float y = yStart;
        ScreenRandom = Random.Range(0, 3);
        if (ScreenRandom == 0)
        {
            img.color = UnityEngine.Color.red;
            text.text = "Select all the Red Objects";
            yield return new WaitForSeconds(time);
            Destroy(img);
            Destroy(text);
            int check = 1;
                for (int i = 0; i < ySize; i++)
                {
                    for (int j = 0; j < xSize; j++)
                    {

                        if (check <= 1)
                        {
                            GameObject rblock = Instantiate(RedPrefabs[Random.Range(0, 1)]) as GameObject;
                            rblock.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        rblock.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        rblock.transform.SetParent(canvas.transform);
                            grid[i, j] = rblock;
                            CountRed++;
                        }
                        else {
                            GameObject block = Instantiate(NonRedPrefab[Random.Range(0, 2)]) as GameObject;
                            block.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        block.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        block.transform.SetParent(canvas.transform);
                            grid[i, j] = block;
                        }
                        check++;
                        x += xWidth * space;
                    }
                    y -= yHeight * space;
                    x = xStart;
                }

        }
        if (ScreenRandom == 1)
        {
            img.color = UnityEngine.Color.blue;
            text.text = "Select all the Blue Objects";
            yield return new WaitForSeconds(time);
            Destroy(img);
            Destroy(text);
            int check = 1;
            for (int i = 0; i < ySize; i++)
            {
                for (int j = 0; j < xSize; j++)
                {

                    if (check <= 1)
                    {
                        GameObject rblock = Instantiate(BluePrefabs[Random.Range(0, 1)]) as GameObject;
                        rblock.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        rblock.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        rblock.transform.SetParent(canvas.transform);
                        grid[i, j] = rblock;
                        CountBlue++;
                    }
                    else {
                        GameObject block = Instantiate(NonBluePrefab[Random.Range(0, 2)]) as GameObject;
                        block.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        block.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        block.transform.SetParent(canvas.transform);
                        grid[i, j] = block;
                    }
                    check++;
                    x += xWidth * space;
                }
                y -= yHeight * space;
                x = xStart;
            }
        }
        if (ScreenRandom == 2)
        {
            img.color = UnityEngine.Color.yellow;
            text.text = "Select all the Yellow Objects";
            yield return new WaitForSeconds(time);
            Destroy(img);
            Destroy(text);
            int check = 1;
            for (int i = 0; i < ySize; i++)
            {
                for (int j = 0; j < xSize; j++)
                {

                    if (check <= 1)
                    {
                        GameObject rblock = Instantiate(YellowPrefabs[Random.Range(0, 1)]) as GameObject;
                        rblock.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        rblock.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        rblock.transform.SetParent(canvas.transform);
                        grid[i, j] = rblock;
                        CountYellow++;
                    }
                    else {
                        GameObject block = Instantiate(NonYellowPrefab[Random.Range(0, 2)]) as GameObject;
                        block.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        block.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        block.transform.SetParent(canvas.transform);
                        grid[i, j] = block;
                    }
                    check++;
                    x += xWidth * space;
                }
                y -= yHeight * space;
                x = xStart;
            }
        }
    } 

Code to check and Load Level 2 is:

void Update () {
        screen = GridControl.ScreenRandom;
        if (Input.GetMouseButtonDown(0))
        {
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;
            if (screen == 0)
            {
                if (Physics.Raycast(ray, out hit))
                {
                    if (hit.collider.tag == "BlueBlock")
                    {
                        Destroy(hit.transform.gameObject);
                        print("GameOver");
                        Application.LoadLevel(0);
                    }
                    if (hit.collider.tag == "RedBlock")
                    {
                        RedCount++;
                        Destroy(hit.transform.gameObject);
                        Correct++;
                        Score.text = " " + Correct;
                        if (RedCount == GridControl.CountRed)
                        {
                            print("Next Level");
                            Application.LoadLevel(3);
                        }
                    }
                    if (hit.collider.tag == "YellowBlock")
                    {
                        Destroy(hit.transform.gameObject);
                        print("GameOver");
                        Application.LoadLevel(0);
                    }
                }
            }
            if (screen == 1)
            {
                if (Physics.Raycast(ray, out hit))
                {
                    if (hit.collider.tag == "BlueBlock")
                    {
                        BlueCount++;
                        Destroy(hit.transform.gameObject);
                        Correct++;
                        Score.text = " " + Correct;
                        if (BlueCount == GridControl.CountBlue)
                        {
                            print("Next Level");
                            Application.LoadLevel(3);
                        }
                    }
                    if (hit.collider.tag == "RedBlock")
                    {
                        Destroy(hit.transform.gameObject);
                        print("GameOver");
                        Application.LoadLevel(0);
                    }
                    if (hit.collider.tag == "YellowBlock")
                    {
                        Destroy(hit.transform.gameObject);
                        print("GameOver");
                        Application.LoadLevel(0);
                    }
                }
            }
            if (screen == 2)
            {
                if (Physics.Raycast(ray, out hit))
                {
                    if (hit.collider.tag == "BlueBlock")
                    {
                        Destroy(hit.transform.gameObject);
                        print("GameOver");
                        Application.LoadLevel(0);
                    }
                    if (hit.collider.tag == "RedBlock")
                    {
                        Destroy(hit.transform.gameObject);
                        print("Game Over");
                        Application.LoadLevel(0);
                    }
                    if (hit.collider.tag == "YellowBlock")
                    {
                        YellowCount++;
                        Destroy(hit.transform.gameObject);
                        Correct++;
                        Score.text = " " + Correct;
                        if (YellowCount == GridControl.CountYellow)
                        {
                            print("Next Level");
                            Application.LoadLevel(3);
                        }
                    }
                }

Code for Level 2 GridBase is;

public void Start()
    {
        grid = new GameObject[ySize, xSize];
        ScreenRandom = GridControl.ScreenRandom;
        float x = xStart;
        float y = yStart;
        if (ScreenRandom == 0)
        {
            int check = 1;
            for (int i = 0; i < ySize; i++)
            {
                for (int j = 0; j < xSize; j++)
                {

                    if (check <= 2)
                    {
                        GameObject rblock = Instantiate(RedPrefabs[Random.Range(0, 1)]) as GameObject;
                        rblock.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        rblock.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        rblock.transform.SetParent(canvas.transform);
                        grid[i, j] = rblock;
                        CountRed++;
                    }
                    else {
                        GameObject block = Instantiate(NonRedPrefab[Random.Range(0, 2)]) as GameObject;
                        block.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        block.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        block.transform.SetParent(canvas.transform);
                        grid[i, j] = block;
                    }
                    check++;
                    x += xWidth * space;
                }
                y -= yHeight * space;
                x = xStart;
            }

        }
        if (ScreenRandom == 1)
        {
            int check = 1;
            for (int i = 0; i < ySize; i++)
            {
                for (int j = 0; j < xSize; j++)
                {

                    if (check <= 2)
                    {
                        GameObject rblock = Instantiate(BluePrefabs[Random.Range(0, 1)]) as GameObject;
                        rblock.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        rblock.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        rblock.transform.SetParent(canvas.transform);
                        grid[i, j] = rblock;
                        CountBlue++;
                    }
                    else {
                        GameObject block = Instantiate(NonBluePrefab[Random.Range(0, 2)]) as GameObject;
                        block.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        block.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        block.transform.SetParent(canvas.transform);
                        grid[i, j] = block;
                    }
                    check++;
                    x += xWidth * space;
                }
                y -= yHeight * space;
                x = xStart;
            }
        }
        if (ScreenRandom == 2)
        {

            int check = 1;
            for (int i = 0; i < ySize; i++)
            {
                for (int j = 0; j < xSize; j++)
                {

                    if (check <= 2)
                    {
                        GameObject rblock = Instantiate(YellowPrefabs[Random.Range(0, 1)]) as GameObject;
                        rblock.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        rblock.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        rblock.transform.SetParent(canvas.transform);
                        grid[i, j] = rblock;
                        CountYellow++;
                    }
                    else {
                        GameObject block = Instantiate(NonYellowPrefab[Random.Range(0, 2)]) as GameObject;
                        block.GetComponent<RectTransform>().anchoredPosition = new Vector2(x, y);
                        block.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f) * scale;
                        block.transform.SetParent(canvas.transform);
                        grid[i, j] = block;
                    }
                    check++;
                    x += xWidth * space;
                }
                y -= yHeight * space;
                x = xStart;
            }
        }
    }

I’m reading between the lines here because it isn’t totally clear what you want but I think you want a different controller script for your player depending on the level.

You could have all scripts on the player but only enable the one relevant to the current level.