It's theoretically possible, but such a script may not work properly all of the time.
If you have a script that goes through the process list killing all processes owned by the current user, eventually it will get to the process that is doing the killing, suicide, and thus not go any further, possibly leaving some other processes behind.