Code help from Uno to MEGA

Hello all. This is a cool code written for Uno using mux, and I am interested in using it on a Mega with the analog pins, no mux. I'm having trouble getting it right.. Any assistance is much appreciated. Below is the original code I found on this site:

You have some code that doesn't work. But instead of showing us that so we can help you fix it, you show us some other code that does work for a different board. Were you hoping we would rewrite it all for you? Ain't gonna happen. Post the code you want help with HERE, not on some other site, and you'll get some help to fix it.

Im trying to re write it, but instead of showing my jacked up failures, I thought I would show the source so that it’s clear what direction to take to an experienced reader. Just hoping for some pointers. Geez…

Well, you can keep with that tactic and wonder why you aren’t getting any responses, or you can show us the code you tried to write and we can help you fix it. The choice is yours.