Vernon Bright and the End of the World by Steve Barlow
Vernon Bright, mad boy scientist, tackles gravity. He's challenged to a weight-lifting contest by the PE teacher and invents an anti-gravity machine. The machine is confiscated and locked in the gym while still switched on. Result: the whole area around the school is flooded with anti-gravitons and the destruction of the earth is imminent. Bright's father has to come to the rescue before everything is sucked into outer space.