Rope/Chain in multiplayer 2d Game

Good day everyone, I wanted to know how to make a chain or rope like in Pico Park? So that it connects several players, well, essentially the same functions as in Pico Park.