Movement Tutorial Script

#pragma strict

var speed : int = 5;

function fixedUpdate(){

if(Input.GetButton("Vertical") || Input.GetButton("Horizontal")){

var myVelocity = transform.forward * (speed * Input.GetAxis("Vertical")) + transform.right * (speed * Input.GetAxis("Horizontal"));
rigidbody.velocity.x = myVelocity.x;
rigidbody.velocity.z = myVelocity.z;
}
}