Welcome to HealingWell!
Unfortunately, we are seeing more and more teenagers these days being diagnosed with IBS. In fact, you'll see a recent post called "School" -- this member is a high schooler who finally decided to get home schooled because IBS was getting so bad. I'm sure you'll also find that many members where diagnosed later, but can actually trace their symptoms back to when they were teenagers. I, for one, am 28 and I was diagnosed in 2005 BUT my symptoms go back over 10 years.
As for IBS being hereditary, it does seem to be. It actually seems to be that almost all GI troubles are passed down - including IBD. For example, I have IBS and my father and grandfather both show signs of it too. You will also see a lot of people with Crohn's or UC that have at least 1 other relative with either Crohn's or UC, or even IBS. It may not always be the exact same thing across the family tree, but usually there is a link to digestive trouble.
Did your doc give you anything to help manage the pain? Maybe an antispasmodic? If you haven't already, you might think about using a heating pad to try and help. Many of us here keep a heating pad on hand, I even have 1 at work... it really does wonders helping to relax the spasms. I realize you can't take a heating pad to school, but maybe using it in the morning before school wouldn't be such a bad idea. I also like to drink some type of calming tea when this happens (I prefer camomile, mint or fennel). You might even consider getting up at least a couple hours before school. Doing this might keep you relaxed enough to make it through school in the morning. It is equally as important to stay away from any trigger foods in the morning before school. No apple juice or sugary breakfast pastries or buttery croissants. Having a light, healthy breakfast is your best bet.