Click & Materials

Hi all, i have problems of about 2 weeks with this, i have 4 capsules, i have a script that colors one capsule with a png texture randomly, i want to : if i click on the colored capsule to do score++ but if i click one of these 3 uncoloured → GameOver();
i have a code but if i click , it returns gameover if the capsule is coloured and when it is not.
i can’t solve this, please help, Thanks.

using UnityEngine;
using System.Collections;

public class Click : MonoBehaviour {
	int score;
	public Material[] culoare = new Material[2];
 
	void OnMouseDown() {
		
		if (GetComponent<Renderer> ().material == culoare [1]) {
			
			score++;
			Debug.Log (score);

		} else {
			GameOver ();
		}
		
		
	}
	
	void GameOver(){
		
		Debug.Log ("Game Over");
	}
}

@Paul23758

try

if (GetComponent<Renderer>().sharedMaterial == culoare [1])
		{
			score++;
			Debug.Log (score);
			
		} 
		else 
		{
			GameOver ();
		}