Help! I'm having sromach pains.

IY

I was just sitting at my grandma's house and i got this intense stabbing pain in my stomach. It went away and like 30 seconds later i got another one. I went home and sat on the toilet for a while because i thought it maybe would be my intestines but no. I'm on the pill and very skinny so i think i would know if i was pregnant. I didn't get one for 15 minutes now but i'm kind of freaked out bc it hurt. Does anyone have any ideas what it could be?