Need rotating hand help

I have my game where my guy picks up the gun, then shoots. I have it where my character is controlled by the aarow keys, and the gun is the cursor. when I click, the gun fires. BUTTTTTTT the only problem I have is that the hand/gun can move anywhere around the screen. I want to make it so that the hand/gun rotates around a certain point on my guy and is only limited to those spaces.

Email me at [email protected] if you wish to see the game, as the game is to big to put on here.