You can take the code, you can credit me if you want, but I'm pretty sure someone has already made something like this b4 code is in sprite2 you can adjust code