Miscellaneous

Identify the executor, use the clipboard, survive teleports and cap the frame rate.

6 functionssUNC 100%Lynx 0.0.0

Everything that doesn't belong to a library: executor details, the clipboard, teleports, performance and thread identity.

Executor

identifyexecutor

since 1.0.0
identifyexecutor(): (string, string)

Returns the executor's name and version: "Lynx" and the module's build number. The build number is not the app version shown in the title bar.

Also available as getexecutorname.

Returns

(string, string)

Name and module build.

Example

local name, version = identifyexecutor()
print(name) --> Lynx

Clipboard

setclipboard

since 1.0.0
setclipboard(text: string): ()

Copies text to the Windows clipboard.

Also available as toclipboard.

Parameters

textstring
The text to copy.

Example

setclipboard(tostring(game.PlaceId))
print("Place ID copied")

Teleports

queue_on_teleport

since 1.0.0
queue_on_teleport(source: string): ()

Queues source to run after the next teleport, once the new place has loaded. Call it more than once to queue several scripts. The queue is cleared after it runs.

Also available as queueonteleport.

Parameters

sourcestring
Luau source to run in the next place.

Example

queue_on_teleport([[
print("Teleported to", game.PlaceId)
]])
game:GetService("TeleportService"):Teleport(game.PlaceId)

Performance

setfpscap

since 1.0.0
setfpscap(fps: number): ()

Caps the client's frame rate at fps. Pass 0 to remove the cap.

Parameters

fpsnumber
Frames per second, or 0 for unlimited.

Example

setfpscap(240)

Thread identity

getthreadidentity

since 1.0.0
getthreadidentity(): number

Returns the identity of the current thread. Code you execute runs at 8.

Also available as getidentity and getthreadcontext.

Returns

number

The thread identity.

Example

print(getthreadidentity()) --> 8

setthreadidentity

since 1.0.0
setthreadidentity(identity: number): ()

Sets the identity of the current thread. Lower identities lose access to protected APIs, which makes this a quick way to see what game code can and can't do.

Also available as setidentity and setthreadcontext.

Parameters

identitynumber
The new identity, from 0 to 8.

Example

setthreadidentity(2) -- the identity of a game LocalScript
print(pcall(function()
return game:GetService("CoreGui"):GetChildren()
end)) --> false, followed by the permission error
setthreadidentity(8)