having trouble on script with pong

I am having trouble with the script on my paddle on pong im using java and I am new to this. this is what I have so far.

#pragma strict
var moveUp : KeyCode;
var moveDown : KeyCode;
var speed : float = 10;
function Update ()
{
if (Input.GetKey(moveUp))
{
gameObject.GetComponent.().velocity.y = speed;
}
else if (Input.GetKey(moveDown))
{
gameObject.GetComponent.().velocity.y = speed *-1;
}
else
{
gameObject.GetComponent.().velocity.y = 0;
}
}

nevermind I figured it out