Looping sprite?

Honestly I’m terrible at math like this, most of the swinging mechanics were taken from a stickman hook-like physics engine by @BLADEr in this topic