How to make camera stop turning when game is paused.

When the game pauses, my character stops walking, but I can still control camera movement. Please help.

camera movement script C#

using UnityEngine;
using System.Collections;

public class CameraMovement : MonoBehaviour {

public GameObject target;
public float rotateSpeed = 5;
Vector3 offset;

void Start(){

	offset = target.transform.position - transform.position;

}


void LateUpdate() {

		float horizontal = Input.GetAxis ("Mouse X") * rotateSpeed;
		target.transform.Rotate (0, horizontal, 0);
	
		float desiredAngle = target.transform.eulerAngles.y;
		Quaternion rotation = Quaternion.Euler (0, desiredAngle, 0);
		transform.position = target.transform.position - (rotation * offset);
	
	transform.LookAt (target.transform);
}

}

You could quit early if time has stopped.

if (Time.timeScale == 0)
   return;

I try to do that at work.