I think I added the math functions but I'm not sure cause my laptop was lagging in the code space to much, I was not able to apply the functions though. The script is in assets right now.