How can i destroy spawned objects according a indicator?

Hi Guys. I have 7 Spawned objects and i have a random changed indicator with every played game. This indicator are have 7 Color/Tag. And 7 spawned objs. are have 7 tag one by one. I want, if this objects tag, are equal tag of indicator. i want destroy spawned objs one by one with mouse click.
i tried many way but i can not do this. Please help me. And Sorry for my bad eng.

i hope this img helps you

Simple, make a script which will be on GameManager(Empty gameobject) and Get Reference of Indicator and from that reference get tag/color of indicator then in other remaining cubes(object) have their own script now in cube script get the tag of indicator from GameManager script below is demo.,

  1. Create GameManager empty game object attach script Color_Colletctor (or any name)

{

public class Color_Collector: Monobehavior

string colorTag

public GameOBject Indicator;

{

 Update()
  {
        colorTag =  Indicator.Tag;
 }

}

}


  1. Script on other 6 cube (make one script and attach to all)
    Cube.cs

{

  public class Cube: Monobehaviour
  {

           public Gameobject GameManagrer;

            void Update()

           {
               if(input.GetMouseButtonDown(0))
               {  
                      if(GameManager.color==this.gameobject.color)
                      {
                              Destroy (this.gameObject);
          `          }
                }
            }
   }

}