Grid Based Mouse Drag

I am making a sort of puzzle game in which the player slides cubes around a grid. But I can't seem to be able to come up with, or find a way, to allow a mouse drag to move the cubes. Basically, I want to be able to click on the cube, and then drag in the direction that I want it to move. I can move a cube with something like the arrow keys, but I just can't get it to move from a mouse drag.

Thanks in advance!

The script HERE will do what you want. You're going to have to extend it if you want to restrict movement to a grid but this should be a good starting point.