First, they lost their front legs. Then, their hind legs. Now, all they can do is slither.

It's been around 100 million years since a trio of genetic tweaks deprived snakes of their ability to walk, and snake-lover and YouTube 'fixer' Allen Pan won't have it any longer.

"When any other animal has deformed legs, humanity comes together to spit in God's face, and we build that animal awesome new cyborg legs," Pan proclaims in a recent YouTube video called 'giving snakes their legs back'.

"But nobody loves snakes enough to build them robot legs. Nobody except for me. Snake lover: Allen Pan."

So begins a very strange (and surprisingly inexpensive) venture that takes Pan from a pet shop to observe the motions of closely related lizards to the house of a local snake breeder to try out an actual prosthetic for snakes.

While the end product that Pan puts together totally works, the science behind the endeavor is a bit tongue-in-cheek.

That said, Pan does mention some interesting research from 2014, which found that cells once destined to become a snake's two hind legs are instead recruited to form a paired external penis, called a hemipenes.

Only one is used for mating at a time, which seems like a missed opportunity for sacrificed legs, but evolution works in mysterious ways.

There must have been some sort of advantage to being smooth and slippery. But unfortunately, the fossil record can only tell scientists so much.

To date, no example of a four-legged snake has yet been found on Earth. One promising fossil discovered in 2015 turned out to actually be a lizard.

Nevertheless, a two-legged snake fossil has been unearthed. It's about 95 million years old and shows robust back legs. Researchers suspect the common ancestor between this ancient snake and modern-day snakes likely resembled a Komodo dragon.

The connection runs contrary to the idea that snakes evolved a legless form to better swim in aquatic environments. Instead, their legless lifestyle might have arisen on land.

If that's true, there must have been some sort of evolutionary advantage to having no legs. One theory is that the ancestors of these slithery animals spent their lives in burrows, where having no legs would have allowed them to access prey hidden in tighter spaces.

In the normal life of a serpent, having four legs is probably a hindrance, so giving snakes back their legs might not be the gift that Pan hoped for.

But it definitely makes a fascinating 'evolutionary' experiment.