Will a girl get pregnant if she had sex just 5 minutes before her period?

It's not likely. In the vast majority of women's cycles, they are only fertile for a day or two in mid-cycle. Still, if you are sexually active, some form of birth control would be a good idea if you do not want to be pregnant.