Period out of control.

I'm 17 years old and in may I had sex for the first time. I've continued to had sex since then. Previously my periods were something that came and went. There were a few cramps and then I was fine. But now I'm writing in pain on my bed in tears by how bad it's hurting. Is my period worse because I'm sexually active? My past two periods have been miserable.