I wrote such a code a long time ago, it's probably still working. This script consists of instalock and chat spammer. If there are any freaks walking around saying I programmed it, hello to them, this is github where we share code and stuff.
A sample image from the application: