I keep on getting annoying texts from idiots at school who got my number, how can I stop them?
How quickly times change!
Only about five years ago barely any children at school had mobile phones and certainly not ten years ago.
However that doesn't help you now does it. In fact - and you aren't saying they are bullying messages - but this is a real problem these days with kids getting such messages by text.
I would recommend that all you should do is ignore them and not even mention them.
If the kids ask specifically whether you got them you can just laugh and say yes they were funny and take it in your stride.
If you show no interest at all they will soon get bored - after all it is costing them, or their parents, good money to send those texts.
If the messages become more than a joke and are bullying for instance then you should tell a parent so that they can take steps to alert the school and ensure that this stops.