How to make a swinging hammer

I’m planning on making a swinging hammer that will sometime appear in my endless runner game. The hammer should rotate from somewhere unseen to a specific angle and stop (So that it’s hidden. How can I do it? I’ve tried multiple ways but it just doesn’t seem to work

All you want it to do is rotate and stop at a specific angle?
If angle <= maxAngle do rotate hammer at speed X.
If hammer.Angle() > maxAngle do maxAngle to Angle of hammer (so the end postion is not dependant on the rotation speed).