Before people invest too much time into this, I can tell you that the issue is your script that gives users points.
It's a terrible script that's been going around for quite some time now and it fills up with data extremely quickly, making reading the file extremely slow, causing the application to freeze.