IsMousePressed()

Example 1:

In the first example, the variable LButtonDown will contain the value true if the left mouse button is held down when the function was called, otherwise the value is false.

var LButtonDown = IsMousePressed("Left")
// test if the left mouse button is down

Example 2:

In the second example, the variable MouseDown will contain the value true if the left and/or right mouse button is held down when the function was called, otherwise the value is false

var MouseDown = IsMousePressed("Left","Right")
// test if the left and/or right mouse buttons are down