It's 140 k xp per hour, but if you use it for 5 + hours it's a 2-day ban. I've tested it. As others mentioned, it equips bolts if you try to use them.
I think it needs to have small built in breaks perhaps, it's like it's so efficient they detect it right away, although, it could also be player reports from people noticing you stood there for a long time.
Although, I did the same method with an auto clicker, and got less xp, but no bans. So I'm pretty sure it's down to how efficient the script is, not sure if you could fix it.
I wouldn't run this for more than an hour or so, sorry for the bad review, I just have to be honest.