Police arrived and the group fled but were quickly found and arrested.
A group of Hastings Boys High School students said the incident had been "terrifying".
They said the group had only been prevented from boarding the bus because of the bus driver, and another student.
The bus driver said: "I was just doing my job, when they're on the bus, they're my responsibility." The five teenagers will face a number of charges including possession of an offensive weapon, wilful damage and assault.
Police were concerned at the pack mentality and that when the youths were arrested three of them were carrying knives.
A police spokesman said: "A classic example of non consequential thinking by young people that could have gone very badly wrong."