A 16-year-old boy from Swindon has admitted to carrying two weapons for his own protection after being robbed at knifepoint.