This is a plug&play player command to set themselves in a "Away From Keyboard" state. So every few secons they will automatically emote a message indicating the reason and how long they are away.
To use it, the player just need to type the command [AFK
They can optionally set an AFK Message using: [AFK <message>
To install, just drop this script anywhere in your Scripts folder.