How to make a worm-like unit?

How do you make a worm-like unit, which is where the body connects into the other body, then the other body connects into other one and so on.

its very impossible be cause you need sprites to make the segments

possible but kinda annoying to make it

What is the script?

Bro, I really hate the 20-letter requirment

same here

SCREW YOU 20 CHARACTER REQUIREMENT