You might want to change the 5000 ms delay into a 500 ms delay, it'd take a really long time before the message is fully transmitted. (Typo I guess?
)
Also, wouldn't the built-in flood protection prevent the script from working correctly? The counter from the amount of messages sent by the script can be reset when the user sends a message himself, but this is also prevented by the script. The user can't reset the counter because
all messages are intercepted (unless of course he sends a /command).
It just doesn't seem a good idea to try this, there are too many obstacles which you can't really get around. I believe it would also be very irritating for you contacts to have to wait several seconds before they get your message.