Object Rotating around center from Mouse Movement

Im trying to have the mouse cursor control an object the player holds so that the object rotates around the player. To give a better picture of what I am looking for, the player is the earth and the object is the moon. I want to have the mouse to move around and determine which way the moon rotates. keep in mind this is a 3rd person 3d game. Any help would be greatly appreciated.

I´m not really sure what you want but if you need the moon itself to rotate you can just use the Spin script that is already in unity.

var rotSpeed: float = 60; // degrees per second
 
function Update(){
  transform.Rotate(0, rotSpeed * Time.deltaTime, 0, Space.World);
}

If you want the moon to follow the mouse aswell you can make it a child of your camera.