Create road to grid in economy game.

Hi, know someone how write some script to create road to grid in game. I’m talking about the same like in “Banished” for example.

This would look like that, i click in some position, move mouse cursor to other position and if i still press mouse button, in game will appear ghost of road. When i release button, road will create. And it important is that road create only vertical and horizontal, not diagonally.

Is someone who can tip me, how can i do this?

What have you got so far? What aspect are you struggling with?