I /think/ this is similar to how animatronics move in the FNaF games? It works decent either way. The code is likely more complex than it needs to be but I had a lot of fun making this! If you want to adjust the Movement Chance, you can see inside (If you set it to any number above 20 or below 1, the dot will not move). 20 means every chance it can move it will successfully move, 1 means it has a very low chance.
Um feel free to use if you would every for some reason need to lol (with credit :<) Movement is not triggered after a certain amount of time, I made it so that every 5 seconds there's a random chance for the dot (animatronic) to move to the next square. This could be an alternate method to other means of animatronic movement in a FNaF scratch fangame.