Stay calm , try to make him feel like you don't see him , because he clearly wants attention , maybe he has a "crush" on you and your friend but in a pervert way , and he may be dangeroos if he threatened to bring a gun , so try to make him feel like you don't see him and he may possibly leave you alone , if you leave him alone , otherwise , if there is anything that happens , do what you did other times , tell a teacher , it's the best way to do .