I want to make a 2d game from bird view and have truble at movement

Ok so i got it moving up and down well bassicly this is what i wrote, what do i write after speed.

var moveUp : KeyCode;
var moveDown : KeyCode;
var moveRight : KeyCode;
var moveLeft : KeyCode;

var speed : float = 10;

function Update ()
{
	if (Input.GetKey(moveUp))
	{
		rigidbody2D.velocity.y = speed;
	}
	else if (Input.GetKey(moveDown))
	{
		rigidbody2D.velocity.y = speed *-1;
	}
	else if (Input.GetKey(moveRight))
	{
	   rigidbody2D.velocity.y = speed ;
	}
	else if (Input.GetKey(moveRight))
	{
	   rigidbody2D.velocity.y = speed;
	}
	else
	{
		rigidbody2D.velocity.y = 0;
	}
}

21560-naamloos.png

When applying the speed to the rigidbody, make sure you’ve chosen the right direction on the right key down.

It seems that you only have chosen Y for each different key down.

Also a quick coding tip:

speed *-1

is the same as

-speed