public void EndGame()
    {
        lb.UpdateLeaderBoard((int)s.Getscore());
        Platformer2DUserControl puc = transform.GetComponent <Platformer2DUserControl>();
        PlatformerCharacter2D   pc  = transform.GetComponent <PlatformerCharacter2D>();

        foreach (GameObject a in sp)
        {
            SpawnerScript ss = a.GetComponent <SpawnerScript>();
            ss.Stopinvokation();
            a.SetActive(false);
        }
        PlatformSpawner p = plat_s.GetComponent <PlatformSpawner>();

        p.Stopinvokation();
        plat_s.SetActive(false);
        SpawnerScript1 ss1 = sp1.GetComponent <SpawnerScript1>();

        ss1.Stopinvokation();
        sp1.SetActive(false);
        puc.enabled = false;
        pc.enabled  = false;
        s.Setincrement(0);
        if (robot_explosion)
        {
            var explosion = Instantiate(robot_explosion, transform.position, transform.rotation);
            Destroy(explosion, 1.0f);
        }
        anim.SetBool("Destroy", true);
        Scorecard.SetActive(true);
        Scorecard.GetComponent <Scorecard> ().SetScore((int)s.Getscore());
    }