Skip to content

Keyboard/Mouse Functions

Is Roblox Active

<bool> isrbxactive(<void>)  

Returns if the Roblox window is in focus. This must return true for any other mouse/keyboard function to work.

Keyboard

<void> keypress(<number> keycode)  

Simulates a key press for the specified keycode. For more information: https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes

<void> keyrelease(<number> key)  

Releases key on the keyboard. You can access the int key values on MSDN.

Left Click

<void> mouse1click(<void>)  

Simulates a full left mouse button press.

<void> mouse1press(<void>)  

Simulates a left mouse button press without releasing it.

<void> mouse1release(<void>)  

Simulates a left mouse button release.

Right click

<void> mouse2click(<void>)  

Simulates a full right mouse button press.

<void> mouse2press(<void>)  

Clicks down on the right mouse button.

<void> mouse2release(<void>)  

Simulates a right mouse button release.

Mouse Movement

<void> mousescroll(<number> px)  

Scrolls the mouse wheel virtually by px pixels.

<void> mousemoverel(<number> x, <number> y)  

Moves the mouse cursor relatively to the current mouse position by coordinates x and y.

<void> mousemoveabs(<number> x, <number> y)  

Move's your mouse to the x and y coordinates in pixels from topleft of the roblox window.