Miscellaneous
Identify the executor, use the clipboard, survive teleports and cap the frame rate.
- Identity and process
- identifyexecutor
- getidentity
- setidentity
- gethwid
- getpid
- getuserdatatag
- getrenv
- Clipboard and dialogs
- setclipboard
- messagebox
- Engine and Luau flags
- getfflagtype
- getfflag
- setfflag
- getluaufflag
- setluaufflag
- Frame rate and teleports
- setfpscap
- getfpscap
- queueonteleport
- clearteleportqueue
- Asset loading
- game:GetObjects
Utilities for thread identity, flags, the clipboard, frame rate and teleporting.
Identity and process
identifyexecutor
identifyexecutor(): (string, string)identifyexecutor returns the executor name and version.
Also available as getexecutorname, identify_executor, get_executor_name and get_executor_identity.
Returns
(string, string)The executor name and version.
getidentity
getidentity(): numbergetidentity returns the identity of the current thread.
Also available as getthreadidentity, get_thread_identity and getthreadcontext.
Returns
numberThe current thread identity.
setidentity
setidentity(identity: number): ()setidentity changes the identity and corresponding capabilities of the current thread.
Also available as setthreadidentity, set_thread_identity and setthreadcontext.
Parameters
identitynumber- The identity to assign to the current thread.
Returns
()This function does not return a value.
gethwid
gethwid(): stringgethwid returns the hardware identifier for the current device.
Returns
stringThe device hardware identifier.
getpid
getpid(): numbergetpid returns the ID of the Roblox process.
Also available as get_process_id and get_process_identifier.
Returns
numberThe Roblox process ID.
getuserdatatag
getuserdatatag(value: userdata): numbergetuserdatatag returns the tag associated with a userdata value.
Parameters
valueuserdata- The value to assign.
Returns
numberThe userdata tag.
getrenv
getrenv(): {[any]: any}getrenv returns the Roblox environment for the current Luau VM.
Returns
{[any]: any}The Roblox environment for this VM.
Clipboard and dialogs
setclipboard
setclipboard(text: string): ()setclipboard copies text to the system clipboard.
Also available as setrbxclipboard and toclipboard.
Parameters
textstring- The text to use.
Returns
()This function does not return a value.
messagebox
Yieldsmessagebox(text: string, caption: string, flags: number): numbermessagebox displays a Windows message box and returns the selected button.
Parameters
textstring- The text to use.
captionstring- The message-box title.
flagsnumber- Windows message-box flags.
Returns
numberThe selected Windows button identifier.
Example
Engine and Luau flags
getfflagtype
getfflagtype(name: string): "bool" | "int" | "string"getfflagtype returns the value type of a registered Roblox fast flag.
Parameters
namestring- The fast-flag name, with or without a supported FFlag, FInt, FString, FLog, DFFlag, DFInt, DFString, or DFLog prefix.
Returns
"bool" | "int" | "string"The flag value type; log and integer flags both return int.
getfflag
getfflag(name: string): stringgetfflag returns the value of a Roblox flag as a string.
Parameters
namestring- The name of the flag.
Returns
stringThe flag value as text.
setfflag
setfflag(name: string, value: string | boolean | number): booleansetfflag sets the value of a Roblox flag and returns whether the change succeeded.
Parameters
namestring- The name of the flag.
valuestring | boolean | number- The value to assign.
Returns
booleanWhether the flag was updated.
getluaufflag
getluaufflag(name: string): stringgetluaufflag returns the value of a Luau flag as a string.
Also available as get_luau_fflag and get_luau_fvariable.
Parameters
namestring- The name of the flag.
Returns
stringThe Luau flag value as text.
setluaufflag
setluaufflag(name: string, value: string | boolean | number): ()setluaufflag sets the value of a Luau flag.
Also available as set_luau_fflag and set_luau_fvariable.
Parameters
namestring- The name of the flag.
valuestring | boolean | number- The value to assign.
Returns
()This function does not return a value.
Frame rate and teleports
setfpscap
setfpscap(cap: number): ()setfpscap changes the maximum frame rate. Pass 0 to remove the cap.
Also available as set_fps_cap, set_frame_rate_cap, set_framerate_cap and setframeratecap.
Parameters
capnumber- The requested maximum frames per second; 0 removes the cap.
Returns
()This function does not return a value.
getfpscap
getfpscap(): numbergetfpscap returns the current frame-rate cap.
Also available as get_fps_cap, get_frame_rate_cap, get_framerate_cap and getframeratecap.
Returns
numberThe current frame-rate cap.
queueonteleport
queueonteleport(source: string): ()queueonteleport queues Luau source to run after the next teleport.
Also available as queue_on_teleport.
Parameters
sourcestring- The Luau source to queue.
Returns
()This function does not return a value.
clearteleportqueue
clearteleportqueue(): ()clearteleportqueue removes all scripts from the teleport queue.
Also available as clear_teleport_queue and clearqueueonteleport.
Returns
()This function does not return a value.
Asset loading
game:GetObjects
game:GetObjects(asset: string): {Instance}game:GetObjects loads a local asset and returns its Instances in an array.
Parameters
assetstring- The local asset identifier to load.
Returns
{Instance}The loaded Instances.
Written for Lynx 0.747
Something unclear? Tell us on Discord