Loadlevel where to applicate?

Sorry if this is a newbquestion.

I want to switch scenes in my game with some keypress. For example when i press 1 i want level 1 to be loaded. I’ve tried to write the script (as you can see below) but where do i applicate/attach the script?

function Start () {

}

function Update () {

if (Input.GetKeyDown ("1")) {
 Application.LoadLevel("Level1");
}
else if (Input.GetKeyDown ("2")) {
 Application.LoadLevel("Level2");
}
else if (Input.GetKeyDown ("3")) {
Application.LoadLevel("Level3");
}
}

In your scene, create an empty GameObject (Ctrl + Shift + N) and drop that script on. Rename the GameObject to “Level Input Controller” or something, if you wish. The script doesn’t care which object it’s attached to, as long it’s in the scene and enabled. Empty GameObjects actually have a lot of different uses. There is no problem doing it this way.