Skip to content

Engine

The Engine namespace provides cheat-side runtime helpers, diagnostics, and timer utilities.


Interfaces

OriginInfo

The OriginInfo interface describes the original source location returned by Engine.MapToSource.

  • fileNamestring - The file name.
  • rownumber - The row.
  • columnnumber - The column.

Cheat Functions

IsSafeMode()boolean

Retrieves state of Safe Mode toggle.

IMPORTANT

If Safe Mode is enabled, all potentially dangerous functions should be not used, like RegisterFireEvent, uncommon requests to GC, etc.

Returned:

  • boolean - True if Safe Mode is enabled, false otherwise.

IsInitialized()boolean

Returns false while script is initializing (before any callbacks called), true otherwise.

Returned:

  • boolean - True if script is initialized, false otherwise.

IsLocalScript()boolean

Returns true if script is local (is not server script) and false otherwise.

Returned:

  • boolean - True if script is local, false otherwise.

IsDevMode()boolean

Retrieves state of developer mode toggle.

Returned:

  • boolean - True if developer mode is enabled, false otherwise.

IsVeboseLogs()boolean

Retrieves state of verbose logs toggle.

Returned:

  • boolean - True if verbose logs are enabled, false otherwise.

GetVDF(path: string)any

Retrieves a VDF (Valve Data Format) file and parses it into a JSON object.

  • pathstring - The path to the VDF file.

Returned:

  • any - The parsed JSON object.

GetUserName()string

Retrieves the current user's name.

Returned:

  • string - The user's name.

GetUserID()number

Retrieves the current user's ID.

Returned:

  • number - The user's ID.

GetUserSubEnd()string

Retrieves the end date of the current user's subscription.

Returned:

  • string - The end date of the user's subscription.

GetSourceMap(fileName: string)string

Retrieves the source map for a given file.

  • fileNamestring - The name of the file.

Returned:

  • string - The source map for the file.

MapToSource(fileName: string, row: number, column: number)OriginInfo

Maps a position in a file to its original source.

  • fileNamestring - The name of the file.
  • rownumber - The row in the file.
  • columnnumber - The column in the file.

Returned:


OnceAtByKey(timeInS: number, key: string, realTime?: boolean)boolean

Checks if a timer has expired and resets it if it has.

  • timeInSnumber - The time in seconds for the timer.
  • keystring - The key of the timer.
  • realTimeboolean (optional) - A boolean indicating whether the timer is based on real time.

IMPORTANT

Version of OnceAt without usage stacktrace (faster), but need usage unique key If key first time used, timer will be reseted and function will return true. Key should be unique for all scripts.

Returned:

  • boolean - A boolean indicating whether the timer has expired.

OnceAt(timeInS: number, realTime?: boolean)boolean

Checks if a timer has expired and resets it if it has.

  • timeInSnumber - The time in seconds for the timer.
  • realTimeboolean (optional) - A boolean indicating whether the timer is based on real time.

IMPORTANT

If key first time used, timer will be reseted and function will return true. Uses OnceAtByKey with file position as key.

Returned:

  • boolean - A boolean indicating whether the timer has expired.

OpenURL(fullURL: string)void

Opens a URL in the default web browser.

  • fullURLstring - The URL to open.

SetUseParticleFow(enabled: boolean)void

Enables or disables visibility of particles in fog.

  • enabledboolean - Whether the feature should be enabled.

SetFogEnable(enabled: boolean)void

Enables or disables white fog (not fog of war).

  • enabledboolean - Whether the feature should be enabled.

SetRFarz(value: number)void

Sets the far clipping plane distance for the rendering engine.

  • valuenumber - The distance to the far clipping plane.

IMPORTANT

For bigger camera distance use bigger value. 5000 is good for common cases.


Crash()void

Causes the game to crash. This is useful for debugging.


ShowWindow()void

Shows the game window.