Random painful periods

Dontasia
I tend to have these random periods. I didnt have one last month, but I did feel some of the pain. But when im actually bleeding i have the worst pain ever. I used to be on birth control to not have these periods but it made me gain alot of weight. So to control not having a random painful period i would have to go back to birth control but the birth control makes me gain weight. Any suggestions and opinions on what i should do?