How do change my characters speed?

Hi there I am making a survival game where I want to be able to change the speed of my character when I click a certain button, how can I do this? I don’t know where the script goes because the character controller already has its own speed scripts. Please help!

You could just make your own movement script like I do, where you control the speeds and such things.

var speed : float = 6.0;
var jumpSpeed : float = 8.0;
var gravity : float = 20.0;
var rotateSpeed : float = 3.0;

private var moveDirection : Vector3 =;

function Update ()
	var controller : CharacterController = GetComponent(CharacterController);
	//Animation Code Here
	if (controller.isGrounded)
		moveDirection = Vector3(0, 0, Input.GetAxis("Vertical"));
		//Rotation Code
		transform.Rotate(0, Input.GetAxis("Horizontal") * rotateSpeed, 0);
		moveDirection = transform.TransformDirection(moveDirection);
		moveDirection *= speed;
		if (Input.GetButtonUp("Jump"))
			moveDirection.y = jumpSpeed;
	moveDirection.y -= gravity * Time.deltaTime;
	//Move Controller
	controller.Move(moveDirection * Time.deltaTime);

Then, you must make the speed variable a static variable, affected by other scripts. Then, code the GUI Button to access the static variable and edit it how you want to.

if (GUI.Button (new Rect (10, 70, 200, 40), "Main Menu" ))
{ += /*However much you want added*/;
	//The plus could be changed with a minus, a star for multiplication or a forward slash for division