Improved the script! Now everything is in functions and uses local variables. wow. much clean. very functional