I shouldn't be surprised that when I went looking for how to do a swing in GameMaker that I found a video by ShaunJS showing exactly how to do it! Awesome work!
Shaun's Rope Swing
A downloadable asset pack
Simple, cosine based circular acceleration that allows easy implementation of a worms style grappling hook.
Player can add momentum left and right and change the rope length.
Watch this free video to learn how to build this effect yourself!
Or simply buy this already-finished version if you don't have time.
Files include a .yyz that can be imported into GameMaker Studio 2, a project folder version for those using the Trial version, and a .gmz that can be imported into GameMaker: Studio 1.X
In order to download this asset pack you must purchase it at or above the minimum price of $5 USD. You will get access to the following files: