Can i still get pregnant?

Had unprotected sex lay night we always use condoms so I was going to buy a plan B but while I was getting ready I got my period so can i still get pregnant? Should I still take it?