It's literally just FAUST.
I *beep* hate Adam Sandler, however, I always found this movie to be particularly interesting and likeable, not because of Sandler of course (even tho he gave a pretty outstanding performance near the end of the film), but because of the script.
so, after thinking about it a lot, out of nowhere I realize that the "genius" of this movie comes from the fact that the story is pretty much a modernized and a bit more light hearted adaptation of Goethe's FAUST. think about it.