Simple, before it kicks you, it prints out a dialog of which you need to confirm you are not afk so it wont kick you out.
Sitting on a bench, suddenly a wild dialog appears showing: "You are standing for X minutes, please confirm below you are not AFK so you wont be kicked. "confirm button here".
If the player presses confirm it lets him keep going and play along.
If the player do not press it on the button until the timer runs out, he's kicked.
Not sure if possible via filterscript but giving a try wont harm and would help us a lot