Help with editing my saving script

So I was wondering how would I make the following script work with GUI buttons instead of having to press a key on the keyboard?

var levelnumber : int;
function SaveLevel () {
     PlayerPrefs.SetInt("LastLevel", levelnumber);
}


 function LoadLevel () {
     var leveltoload = PlayerPrefs.GetInt("LastLevel");
     Application.LoadLevel(leveltoload);
}
var autoLoad : boolean;

function Start() {
  if(autoLoad==true) {
  LoadLevel();
  }
}
function Update() {
  if(Input.GetKey("m")) {
  SaveLevel();
  }
  if((Input.GetKey("b"))(autoLoad==false)) {
  LoadLevel();
  }
}

I’ve already read this and I still don’t particularly understand how I would call my LoadLevel and SaveLevel functions with it?

I don’t know why but I feel like you are making fun of me, am I paranoid ? :???:

I mean, look at this :

		if (GUI.Button (Rect (10,10,200,20), "Meet the flashing button")) {
			print ("You clicked me!");
		}

This code makes a button that, when clicked, executed the line print (“You clicked me!”);

Replace it by any function you want, or more code line, and it will be executed.

Thanks for your help, and no I wasn’t making fun of you lol :slight_smile: