This variable returns the last mouse button that was pressed and can return any of the special mouse constants except mb_any (you may also set this variable to one of the constants).
mouse_lastbutton
Mouse Button Constant (except mb_any)
if (mouse_lastbutton == mb_left)
{
x -= 1;
}
This code moves the current instance left if the last button pressed was the left mouse button.