How would I make an arcade style rope swing

Basically, I want to make a rope tool that when the player equip it and walk up close to a pole or something and press a certain key the player will start swinging back and forth and release when press a certain key. Kinda like this

(Go to about 0:56 to see what I mean)

The issue is that I think that the rope swing system I’m trying to do is not physic based and I’m not a very good scripter so I’m here asking for a solution and a way to do it (Not asking for a full script btw)

I tried to search for some solutions earlier but still found none that could help me.

So if you have some suggestions that could help me with this please reply below, Thanks in advance