# i'm not that rly good at scripting i don't understand everything in your code but it looks like the solution