Input Simulation
Drive synthetic mouse clicks, movement and scrolling.
Synthetic mouse input delivered at the OS level. It goes to whichever window has focus, so check that Roblox is the active window before you send anything.
Clicking and moving
if isrbxactive() then
mousemoveabs(960, 540) -- centre of a 1080p screen
mouse1click()
mousemoverel(50, 0) -- relative nudge
mousescroll(-1)
endAbsolute coordinates are screen coordinates
mousemoveabs takes a screen position, not a position inside the Roblox window. If the window is not maximised, offset by its position first.