Even the most outlandish tale set in the weirdest legandarium you could possibly conceive must have characters based on real people.
It's a fact of life.
People don't have copyrights. They can't copyright that weird hair-flip thing, they can't copyright the way their hips swing when they walk or the way they chew the straws when they drink iced tea, and they certainly can't copyright what they say when they bully you.
So put it in your story.
Here's how to do it legally and effectively:
Basing a Character on You:
1. Take a good hard look at yourself. In books it's okay to embellish yourself - as in, take away that annoying spot on your chin or fix your eyebrows so that they don't look like two catipillars have died on your face - but don't airbrush yourself too much because, after all, the whole point of basing characters on real live humans is to make them, well, human.
2. Observe any mannerisms or rituals you do. Do you brush each tooth for exactly three seconds? Do you brush your hair 100 times before you go to bed without fail? Do you sing 'Pocketful of Sunshine' really loudly in the shower? Or am I the only person weird enough to do (and admit) these things?
3. Don't be afraid to put this character in situations you may be unfamiliar with - in fact, experiencing things through characters is amazing. Just think each detail of the scenario through carefully, and dissect exactly what you would do.
4. Emphasize any good characteristics (or make up some if you lack) if you're trying to make yourself a hero, or emphasize any bad characteristics if you're trying to make yourself a villain. But please, please, please don't go for the all-heroes-are-pretty-and-all-villains-are-ugly stereotype. Please.
Basing a Villain on Someone You Hate:
1. Pick someone you positively detest. This technique works best for people who bully you (cough Legolas).
2. Why do you hate them? C'mon, be mean. Make a list. And make sure nobody finds that list.
3. It may be easier to write this character if you keep their original name. Then, make up a different name (this is important, so you don't wind up in court if your book gets published) and try it on for size.
4. Don't be broad or vague as to why this character is a particularly heinous breed of bitch. Any scenario that the person this character is based on should be remebered and somehow written in, almost word-for-word as it was.
5. Try not to villainify them to the point of eye-bleeding extremism. If they're pretty, don't make them uglier than that Alien in that Sigourney Weaver horror movie. If they're smart, dumbing them down will make it pretty hard to recreate verbal abuse and clever pranks that they pull on you in your book (people with Low IQs never get further than hiding your bag in the boys toilets or putting glue on your seat.)
6. The best part about villainifying people you know is that it is a brilliant revenge - seriously, whenever I'm down or having writer's block all I think of are the faces of the people I've based not-so-nice characters on and immediately you have plenty to write about. The art of this is making it blatantly obvious to people who know you, as well as the person in question, who the character is based on, but carefully written so you can deny it all to the general public.
7. This method works best for bullies and bad exes. This will not particularly work on the girl you hate because she has buck teeth or bad breath or teachers, especially if you hate all teachers in general.