expecting (, found 'OnGui' HELP!!!

var playerSpeed : int;

var playerLives : int;

static var playerScore : int;

var bullet : Rigidbody;


function Update () {


amtToMove = (playerSpeed * Input.GetAxis("Horizontal")) * Time.deltaTime;

transform.Translate(Vector3.right * amtToMove);


if( Input.GetKeyDown("space")){

   var tempBullet : Rigidbody;
   
   tempBullet = Instantiate(bullet,transform.position,transform.rotation);


}


        
function OnGUI(){

GUI.Label(Rect(10,10,200,50),"Score:" + playerScore);

GUI.Label(Rect(10,30,200,50),"Lives:" + playerLives);

}

please help I am completely lost and have tried doing everything it says
please be aware I am very new to scripting and unity and don’t know a lot!

Please format your code when posting at UA using 10101 button.
You are missing a closing } at the end, before the “function OnGUI” to close out the Update()