Show message when mouse is released

Is there a way to create a script that checks the mouse, and will show a message when the mouse is released?