Sniper zoom with texture

I need help getting a crosshair texture to show only when I am pressing the scope button.
I have the script where I can zoom in like a sniper and see further away but I need a crosshair to cover the sides and make it look like a circle shape with a cross in the middle.
Here is a picture as an example.
14433-images.jpg

Here is my script.

public Texture sniperScope;

void Update (){
	float altFieldOfView = 60.0f;
	float ZoomLevel = 10.0f;

if(Input.GetMouseButtonUp(1)) {
    float temp = camera.fieldOfView;
    camera.fieldOfView = altFieldOfView;
    altFieldOfView = temp;
	
}
	
if(Input.GetMouseButtonDown(1)) {
    float temp = camera.fieldOfView;
    camera.fieldOfView = ZoomLevel;
    ZoomLevel = temp;
	}
}

You can usually find free to use scopes etc on Google, or you can create one yourself using something like Photoshop if you want.

In terms of making it show up when you press the button, make sure that the GUI is a child of the camera, or whatever your script is attached to and try something like:

void Crosshairs()
{
   crosshair.enabled = !crosshair.enabled
}

You can then call the function when you press your mouse button, so in your case:

if(Input.GetMouseButtonDown(1))
{
  crosshairs();
}

if(Input.GetMouseButtonUp(1))
{
  crosshairs();
}

I’m still a newbie to scripting, so that is probably not even close to right, but I hope this helped a little!

You can create a GUI texture and enable/disable it inside the script with GUITexture.enabled = true/false

`var scopeTexture : GUITexture;

function Update() {

if(Input.GetMouseButtonDown(1)) {

scopeTexture.enabled = true;

}

if(Input.GetMouseButtonUp(1)) {

scopeTexture.enabled = false;

}

}

sorry that this is in JS but i think the syntax is a bit similar`