Drag & drop from cursor location instead of object origin

The way I had it, when you dragged something it would snap the origin of the object to the cursor. I’m trying to get it so it drags it by where you clicked. The problem with my current method is that I’m just zeroing out the difference and it never gets dragged
45148-