The MainCamera is a child of the main hero now. and the code is http://pastie.org/1009868,, now the problem is that when I rotate the camera when pressing right click(Fire2) it rotates the camera around itself and not around the main hero.
I'm assuming what you're after here is an orbiting camera.
A simple way to do this is parenting the camera to a Cube GameObject (with collider removed). Set its position in the inspector to where you want the camera to be, as though the box were the player (make sure it's looking at it too). Take the script you had on the camera, with code to rotate and such, and instead put it on the cube. Name the cube something sensible like "camera locus".
Now parent the cube (camera locus) to your hero and set the cube's position to 0,0,0. This should place it on top of the hero. Turn off its renderer when you're happy with its position. Remember you can turn it back on to see where it is in the game if you get funny behaviour.
You should now find that a script rotating camera locus will result in the camera orbiting the hero.
You can also use my pretty basic camera script found on the wiki, called FollowTrackingCamera.