Why Isn't This Sprint Working?

Why isnt this working? I can see NO syntax problems or incorrectly typed variable names?
It just doesnt work, theres no errors or anything, it just doesnt work?

var MoveSpeed = float;
var RunSpeed : float = 4.0;
var RunSpeed : float = 4.0;
var SprintSpeed : float = 8.0;
var JumpHeight : float = 6.0;

var Gravity : float = 20.0;

private var MoveDirection : Vector3 = Vector3.zero;

private var ButtonA : boolean = false;
private var ButtonD : boolean = false;
private var ButtonS : boolean = false;



function Start()
{
	MoveSpeed = RunSpeed;
}



function Update()
{
	var controller : CharacterController = GetComponent(CharacterController);
	
	if(Input.GetButton("A"))
	{
		ButtonA = true;
	}
	else
	{
		ButtonA = false;
	}
	
	if(Input.GetButton("D"))
	{
		ButtonD = true;
	}
	else
	{
		ButtonD = false;
	}
	
	if(Input.GetButton("S"))
	{
		ButtonS = true;
	}
	else
	{
		ButtonS = false;
	}
	
	
	
	if (controller.isGrounded)
    {
    	MoveDirection = Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
        MoveDirection = transform.TransformDirection(MoveDirection);
        MoveDirection *= MoveSpeed;
            
        if(Input.GetButtonDown("Sprint") && !ButtonA && !ButtonD && ButtonS)
        {
		MoveSpeed = RunSpeed * SprintSpeed;
        }
            
        if(Input.GetButtonUp("Sprint"))
        {
            MoveSpeed = RunSpeed;
        }
        
        if (Input.GetButton ("Jump"))
        {
        	MoveDirection.y = JumpHeight;
        }
	}
    MoveDirection.y -= Gravity * Time.deltaTime;

    controller.Move(MoveDirection * Time.deltaTime);
}



function Sprint()
{
	MoveSpeed = SprintSpeed;
}



function EndSprint()
{
	MoveSpeed = RunSpeed;
}

So, the error message will include the line number where the compiler found the error. If you locate this line, it should be “obvious” what’s wrong. I looked through the code quickly and didn’t see a problem. Let the community know the line number if you need more help.