@RomekZiomek's script was really sloppy, he defined several things at several places at the same time, variables changed for nothing, and apparently it was laggy for some people although I experienced none. Hopefully I have fixed it. If you have any questions feel free to ask.