Code not working right for fps game

I created a simple code as a controller for a fps and then after trying to add a sprint function I kept geting this error:

Assets/Script/_Playermove.cs(51,17): error CS0266: Cannot implicitly convert type double' to float’. An explicit conversion exists (are you missing a cast?)

and I do not know what this means. Here is the code:

using UnityEngine;
using System.Collections;

public class _Playermove : MonoBehaviour {
	
	public float movementspeed = 3.0f;
	public float mousesensitivity = 5.0f;
	public float jumpspeed = 3.0f;
	float pitchrot = 0;
	
	public float pitchlimit = 90.0f;
	float verticalvelocity = 0;
	
	// Use this for initialization
	void Start () {
		
		Screen.lockCursor = true;
		
	}
	
	// Update is called once per frame
	void Update () {		
		CharacterController cc = GetComponent<CharacterController>();
		//rotation
		
		float rotyaw = Input.GetAxis("Mouse X") * mousesensitivity;
		transform.Rotate(0, rotyaw, 0);
		
		float rotpitch = Input.GetAxis("Mouse Y") * mousesensitivity;
		
		pitchrot-=Input.GetAxis("Mouse Y") * mousesensitivity;
		pitchrot = Mathf.Clamp(pitchrot, -pitchlimit, pitchlimit);
		Camera.main.transform.localRotation = Quaternion.Euler(pitchrot, 0, 0);
		
		//Movement
		float forwardspeed = Input.GetAxis("Vertical") * movementspeed;
		float sidespeed = Input.GetAxis("Horizontal") * movementspeed;		

		if(cc.isGrounded && Input.GetButton("Jump") ) {
		verticalvelocity = jumpspeed; 
		}
		
		if(Input.GetKeyDown(KeyCode.LeftShift) ) {
		movementspeed = 3;
		}
		
		if(Input.GetKeyUp(KeyCode.LeftShift) ) {
		movementspeed = 5;
		}
		
		verticalvelocity += -9.81 * Time.deltaTime;
		
		Vector3 speed = new Vector3( sidespeed, verticalvelocity, forwardspeed );
		
		speed = transform.rotation * speed;
		
		
		cc.Move( speed * Time.deltaTime );
	}
}

try this one this one needs a mouselook script

	public float curSpeed = 10.0f;
	public float jumpForce = 8.0f;
	public float gravity = 20.0f;
	
	Vector3 moveDirection = Vector3.zero;
	
	
	
	
	
	
	void Update () {
		
		Vector3 v3 = Camera.main.transform.forward;
		v3.y = 0.0f;
		
		transform.rotation = Quaternion.LookRotation(v3);
		
		CharacterController controller = GetComponent<CharacterController>();
		
		if(controller.isGrounded){
			moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
			moveDirection = transform.TransformDirection(moveDirection);
			moveDirection *= curSpeed;
			
			//jumping
			if(Input.GetButton("Jump"))
				moveDirection.y = jumpForce;
		}
		
		moveDirection.y -= gravity * Time.deltaTime;
		controller.Move(moveDirection * Time.deltaTime);
		
		waitFrameForSwitchGun -= 1;
	}