The way i though about doing would be get the mouse position when the mouse clicks and then get the mouse position when the button is released. Then just re-sizing a cube between those positions, then just doing a simple collider. I know how to do all of that except re-sizing the cube how would that be achieved? if there is a better way please tell me thanks.
Calculate the Vector3 that is right in the middle of the down and up Vector3s and place the cube there. Then you can just set the localScale of the cube to the difference between the down and up Vector3s (example: x should be scaled to 10 if there is 10 between down's x-position and up's x-position).