You may want to write your own script - I'm trying to stay objective, but that script is flawed.
First off, those echo statements are being redirected to /dev/null. What's the point?
And it uses kill -9 right away, which is a Bad Thing if your users have anything running or any processes backgrounded. Also, I've seen problems with killing off a user very harshly like that that can mess up their entries in w or who, saying they exist even though they don't. You'll also end up with orphaned processes that way...
One alternative that I've seen is idled:
http://www.darkwing.com/idled/
It's a little cleaner than crashing around in the dark "kill -9"'ing processes automatically.