You should spend some time learning about guns, because an AR-15 isn't even remotely enough firepower for a bear. A common opinion is that 5.56 is so small it's not appropriate to hunt deer with, so if the bear has decided to eat you then 30 rounds of 5.56 is just going to piss it off.