Lets not all pretend that we were heroes in high school. Sometimes peer pressure is a bitch. I feel for this guy.
To the OP. Here is the deal... I know that it scares you, but if you tell your friend that you don't want to be a part of the cheating, he will be the one that feels stupid, not you.
I might be hard to say "no," but only for a minute. You will feel much better afterward. He will feel like a douche forever.
Now that I am in my 30s, I would cringe if I thought back to High School and remembered asking someone to let me cheat, ESPECIALLY if the person said "hell no."
You will earn respect by saying "no."
Don't be a dick about it, just say, "You know what man, I am an honest person. If you smell like shit, I am going to be a friend and tell you. Right now, you smell like shit. If you want help studying, let me know. I am not going to be a part of any cheating scheme, sorry."