Change the variables in the top left to change both the snappiness/smoothness of the grid and the size of the block being moved.
Code made by me