Invert mouse control

So I’m trying to make a options menu for my game where you could change mouse controls to inverted by pressing that button. Here’s the code for how I’m making the button. I would love if someone could help me and show how it’s done.

So basicly: You press that Invert Mouse button and mouse gets inverted, but I don’t have any clue how to do this and couldnt really find anything useful from UnityAnswers or Unity Script Reference.

function OnGUI () 


GUI.DrawTexture(Rect(Screen.width/2-(texturewidth/2*x), Screen.height/2-(textureheight*y), texturewidth*x, textureheight*y), texture);//Draw Tex

if(GUI.Button(Rect(Screen.width/2-(buttonwidth/2*x), Screen.height/2, buttonwidth*x, buttonheight*y),"Invert Mouse"))//Draw button

//Invert mouse on/off code here

if(GUI.Button(Rect(Screen.width/2-(buttonwidth/2*x), Screen.height/2+(buttonheight*2*y), buttonwidth*x, buttonheight*y),"Back to Main Menu"))//Draw button

		Application.LoadLevel("Main Menu");//Back to mainmenu



The only answer I’ve gotten wasnt anywhere near what I need so… Anyone, Please read my message and answer to what I need and not with what I do not need.

This is an old question but I’m just responding for anyone else that may find it when looking for a way to do this. I’m new to unity so I’m not sure if this is the best way to do it but it works for my purposes.
I added a public Boolean variable called invertY in the MouseLook script that is on the main camera and used it like this to invert the camera.

					rotationY += Input.GetAxis("Mouse Y") * -sensitivityY;
					rotationY += Input.GetAxis("Mouse Y") * sensitivityY;

In the menu script I did the following to get a button to control the invertY variable:

				GameObject.FindGameObjectWithTag("MainCamera").GetComponent<MouseLook>().invertY = false;
				GameObject.FindGameObjectWithTag("MainCamera").GetComponent<MouseLook>().invertY = true;

I don't know if you the OS mouse position is read / write, but I guess it's not. Based on that, you should draw your own cursor ( The website seems to be down right now, so here is mine in c# with modifications

Then in case of inversion, just invert the mousePos