isrbxactive
Returns whether the Roblox game window is currently in focus.
function isrbxactive(): booleanSynopsis
How it works
Checks whether the Roblox game window currently has OS focus:
HWND foreground = GetForegroundWindow();
HWND roblox = FindWindowA(NULL, "Roblox");
return foreground == roblox;
Returns true if the player is actively viewing the Roblox window, false if it's minimized, occluded, or another application has focus. The check is a single Win32 API call — essentially free.Use case
Used as a guard before sending input events. Simulated mouse/keyboard input targets the focused window, so sending clicks while Roblox is unfocused would interact with the wrong application. Always check
isrbxactive() before calling mouse or keyboard functions.Usage
Guard input calls
if isrbxactive() then
mouse1click()
endReturns
boolean true if the Roblox window is focused.
Alias
Also available as isgameactive.