Taking the pill while on your period

I wanna start my pill and this period is awful, can I start takin my pill again even though I'm coming to the end of my period?