Increasing float over time?

I need to increase the speed of an object in Unity over time so it kinda moves like if you were on ice, or sliding around. Something like that, here’s the code:

#pragma strict

public var player : GameObject;
static var selectedId : int;
var speed : float = 0;
private var minimum = 0;
private var maximum = 4;
private var tParam : float = 0;
 
function Update () {
	if (Input.GetKey (KeyCode.UpArrow)) {
		//speed += Time.deltaTime * 2.5f;
		if (tParam < 1)
			tParam += Time.deltaTime * 0.9;
		speed = Mathf.Lerp(minimum, maximum, tParam);
	} 
	else if (Input.GetKey (KeyCode.DownArrow)) {
		//speed += Time.deltaTime * 2.5f;
		if (tParam < 1)
			tParam += Time.deltaTime * 0.9;
		speed = Mathf.Lerp(minimum, -maximum, tParam);
	}
	/*else {
		while (speed > 0)
			speed -= Time.deltaTime * .7f;
	}*/

	transform.Translate (Vector2(0, 1) * Time.deltaTime * speed); 
}

It works absolutely fine except for the fact then after the speed reaches it’s maximum, it stops working like it should, removing the actual effect I wanted it to give. I want there to be a maximum speed you can go, but not remove the sliding effect on the object.

UPDATE: I solved the problem, turns out I need something to lower the speed when no arrow keys are pressed for it to work. Code:

#pragma strict

public var player : GameObject;
static var selectedId : int;
var speed : float = 0;
private var minimum = 0;
private var maximum = 8;
private var tParam : float = 0;
private var speedDeduct : float;
 
function Update () {
	if (Input.GetKey (KeyCode.UpArrow)) {
		if (speed <= 7) {
			if (tParam < 1)
				tParam += Time.deltaTime * 0.35;
			speed = Mathf.Lerp(minimum, maximum, tParam);
		} else if (speed >= 7) {
			speed = 7;
		}
	} 
	else if (Input.GetKey (KeyCode.DownArrow)) {
		if (speed >= -7) {
			if (tParam < 1)
				tParam += Time.deltaTime * 0.35;
			speed = Mathf.Lerp(minimum, -maximum, tParam);		
		} else if (speed <= -7) {
			speed = -7;
		}
	}
	else {
		speedDeduct = 4 * speed;
		speed -= speedDeduct * Time.deltaTime;
	}
	
	transform.Translate (Vector2(0, 1) * Time.deltaTime * speed); 
}