Unity changing of color

TileScript.cs

using UnityEngine;
using System.Collections;

public class TileScript : MonoBehaviour {
	
	private Color originalColor;
	private float x;
	private float y;
	
	// Use this for initialization
	void Start () {
		originalColor = this.renderer.material.color;
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
 public void OnMouseOver(){
		this.renderer.material.color = Color.red;
		//RaycastHit hit;
		//Ray ray = camera.ScreenPointToRay(Input.mousePosition);
			
		//if(Physics.Raycast(ray, out hit, 300))
		//{
		
			InputScript script1 = Camera.main.GetComponent<InputScript>();
			GUIScript script2 = Camera.main.GetComponent<GUIScript>();
			GenerateTiles script3 = Camera.main.GetComponent<GenerateTiles>();
			
			
			if(script2)
			{
				
				if(script1.type == 1)
				{
					//if(script3.CheckOccupied(script1.school.gameObject, 2, 2))
					//{
					//	this.renderer.material.color = Color.green;
					//}
				
					//if(script3.Start())
					//{
					//	this.renderer.material.color = Color.green;
					//}
				
					//if(script3.SetOccupied(script1.school, 2, 2))
					//{
					//	this.renderer.material.color = Color.green;
					//}
				
				
					this.renderer.material.color = Color.green;
					
				}
			
				if(script1.type == 2)
				{
					
					this.renderer.material.color = Color.yellow;
				
					
				}
				if(script1.type == 3)
				{
					this.renderer.material.color = Color.blue;
				}
				if(script1.type == 4)
				{
					this.renderer.material.color = Color.green;
				}
			
				if(script1.type == 5)
				{
					this.renderer.material.color = Color.green;
				}
			
				if(script1.type == 6)
				{
					this.renderer.material.color = Color.green;
				}
			
				
				if(script1.type == 7)
				{
					this.renderer.material.color = Color.green;
				}
			
				
				if(script1.type == 8)
				{
					this.renderer.material.color = Color.green;
				}
			
				
				if(script1.type == 9)
				{
					this.renderer.material.color = Color.green;
				}
			
				
				if(script1.type == 10)
				{
					this.renderer.material.color = Color.green;
				}
		}
				
				
		
		
			
		
		
			
			
		//}
			
		
		
			
		
	}
	
	void OnMouseEnter()
	{
		this.renderer.material.color = Color.yellow;
	}
	
	void OnMouseExit()
	{
		this.renderer.material.color = originalColor; 
	}
}

Generate.cs

using UnityEngine;
using System.Collections;

public class GenerateTiles : MonoBehaviour {
 
   	public int board_size_x_;
   	public int board_size_z_;
   	public GameObject tile_prefab_;
	
	public Color colorStart ;
    public Color colorEnd ;
	
	
	public GameObject[,] tileObj = new GameObject[10 , 10];
	public int[,] tileData = new int[10, 10];
 
	// Use this for initialization
	public void Start () {		
		for (int x = 0; x < board_size_x_; x++) {
			for (int z = 0; z < board_size_z_; z++) {
				tileObj[x, z] = Instantiate(tile_prefab_,new Vector3(x * 10.5f,0,z * 10.5f),Quaternion.identity) as GameObject;
				tileData[x, z] = 0;

				
				    
			}
		}
		
		
		
	}
	
	
	
void OnMouseCheck(GameObject obj, int x, int z)
{
		
}
	
	
public void CheckColor(GameObject obj, int x, int z) {
	int ix = (int) obj.transform.position.x / 10;
	int iz = (int) obj.transform.position.z / 10;		
		
		for(int i = ix; i < ix + x; i++)
		{
			for(int j = iz; j < iz + z; j++)
			{			
				tileData[i, j] = 1;
				
				
			}
		}
		
				
}




public bool CheckOccupied(GameObject obj, int x, int z) {				
		int ix = (int) obj.transform.position.x / 10;
		int iz = (int) obj.transform.position.z / 10;
		
		for(int i = ix; i < ix + x; i++)
		{
			for(int j = iz; j < iz + z; j++)
			{
				if(i >= 10 || j >= 10)
					return true;
				
				if(tileData[i, j] == 1)
					return true;
			}
		}
		
		return false;
	}
	

	
public void SetOccupied(GameObject obj, int x, int z) {
		int ix = (int) obj.transform.position.x / 10;
		int iz = (int) obj.transform.position.z / 10;		
		
		for(int i = ix; i < ix + x; i++)
		{
			for(int j = iz; j < iz + z; j++)
			{			
				tileData[i, j] = 1;
				//tile_prefab_.renderer.material.color = Color.blue;
			}
		}		
	}			
}

With these 2 set of codes, so now, what I am trying to do, when I am scrolling the mouse cursor to the tile map, it would automatically change to the color according to the script.type color in TileScript.cs. But, instead of only changing 1 tile map of color as what i had doing it right now, I want to make it where can change color by 2 by 2 tile maps or 2 by 1 tile map when scrolling the mouse cursor. but riht now, it is not working, any1 can help.