display_mouse_get_x()
From YoYoGames Wiki
Description
This function returns the x position of the mouse within the entire display of your screen
Returns
- (integer): x-position of the mouse
Explanation
This function returns the x position of the mouse within the entire display of your screen. If you want the value to be relative to the game window, use window_mouse_get_x. And if you want the value to be relative to the room itself use the variablemouse_x.

