Sprite movement similar to Gungeon/Nuclear Throne/Etc

Hey so I’m making a top down action style of game, and I want to have a sprite and weapon that rotates around a mouse.

So there’s 2 separate question I have which is how to make the sprite change based on the direction of the mouse, and how to make a floating weapon follow and flip accordingly to the mouse.

For the weapon I’m using the look_at() function currently, which works fine, but I’m not sure how to flip it so the sprite doesn’t fully rotate once the mouse goes to the right, any help with that?