Rewrote all script, hopefully it will work ^^