Thanks!You can find the solution in my script. Pay attention to the "set_snake_position" function (on line 66) and what happens in the "update" function (on lines 157-163). I hope this helps you.
snake.script
thanks strash!!!