Skip to content

API

Properties

CheaterFound

AntiCheat.CheaterFound: Signal<Player>

Invoked when the anti-cheat determines a player is cheating

AntiCheat.CheaterFound:Connect(function(player)
    Players:BanAsync({
        UserIds = { player.UserId },
        DisplayReason = "\"There is no right and wrong. There's only fun and boring.\" ~ Hackers"
    })
end)

ViolationTriggered

AntiCheat.ViolationTriggered: Signal<Player, string, string>

Warning

This signal should not be used to detect cheaters. Use the CheaterFound signal instead!

Invoked when a player triggers a rule violation, increasing their anti-cheat score.

AntiCheat.ViolationTriggered:Connect(function(player, node, message)
    print(`Player {player.Name} has violated node '{node}': '{message}'`)
end)

Nodes

AntiCheat.Nodes: { [string]: { any } }

Table denotating the different nodes that this version of the AntiCheat supports, you can pass these nodes directly into the APIs that require NodeTable.

Nodes represent the fundamental building blocks of the Anticheat system. Each node defines a specific feature or functionality.

Currently available keys:

  • ProximityPrompt
  • Honeypot
  • AntiClimb
  • AntiSwim
  • AntiFly
  • AntiNoclip
  • AntiSpeed

Methods

:AddToWhitelist

AntiCheat:AddToWhitelist(player: Player): ()

Adds a player to the whitelist. Whitelisted players are exempt from anti-cheat monitoring and can freely bypass restrictions.

This is a server only method.


:Disable

AntiCheat:Disable(): ()

Disables the anti-cheat. When this method is called, all detection nodes are stopped, meaning players will no longer be monitored.

This is a server only method.


:DisableNode

AntiCheat:Disable(node: string | NodeTable): ()

Disables a specific "node" of the AntiCheat.

To further explain what a Node is - the anticheat is broken up into several parts, each play their own role in identifying potential exploiters, and then getting them detected.

Developers have the ability to disable/enable different nodes in the event the Noclip detection is currently acting up and we may not have the time to address the issues with it.

AntiCheat:DisableNode(AntiCheat.AntiFly)
AntiCheat:DisableNode("AntiFly")

This is a server only method.


:Enable

AntiCheat:Enable(): ()

Enables the anti-cheat. This should only be called if the anti-cheat has been previously disabled using the :Disable method.

This is a server only method.


:EnableNode

AntiCheat:EnableNode(node: string | NodeTable)  ()

Enables a specific "node" of the AntiCheat.

To further explain what a Node is - the anticheat is broken up into several parts, each play their own role in identifying potential exploiters, and then getting them detected.

Developers have the ability to disable/enable different nodes in the event the Noclip detection is currently acting up and we may not have the time to address the issues with it.

AntiCheat:EnableNode(AntiCheat.AntiFly)
AntiCheat:EnableNode("AntiFly")

This is a server only method.


:FlagAsCheater

AntiCheat:FlagAsCheater(player: Player): ()

Flags a player as a cheater. This information is stored in a datastore, managed entirely by the anti-cheat system.

Warning

This function is automatically called when a player is detected as a cheater. See CheaterFound for more details.

This is a server only method.


:IsFlaggedAsCheater

AntiCheat:IsFlaggedAsCheater(player: Player): boolean

Allows developers on both the client, and the server - to query if the current player is a cheater or not.


:QueryScores

AntiCheat:QueryScores(player: Player): { [string]: number }

Allows developers to query the current players score for all nodes. Score indicates how likely that player is to be a cheater, it's not a direct indication that these players are cheaters.

This is a server only method.


:QueryViolations

AntiCheat:QueryViolations(player: Player): { [string]: {string} }

Allows developers to query a list of violations that the current player has broken, this list includes messages explaining what has gone wrong and information about the event.

This list is broken up to allow developers to see what specific nodes a player has violated, then the messages are bundled under each node.

This is a server only method.


:RemoveFromWhitelist

AntiCheat:RemoveFromWhitelist(player: Player): ()

Removes a player from the whitelist. See AddToWhitelist for details.

This is a server only method.


:ResetFlag

AntiCheat:ResetFlag(path: string): ()

Will reset the flag to whatever it is by default, this allows developers to safely fallback to the defaults without having to create references for each flag before hand.

AntiCheat:ResetFlag(AntiCheat.AntiFly.RaycastDistance)

This is a server only method.


:SetFlag

AntiCheat:SetFlag(path: string, value: any): ()

Allows developers to configure specific flags the anticheat, and all nodes under it uses to identify and detect potential exploiters.

Be careful when modifying these flags, we should try to optimise the default flags over having different flags defined per project.

AntiCheat:SetFlag(AntiCheat.AntiFly.RaycastDistance, 1.5)

-- alternatively, if you know what these are called internally, you can use the name of the path you're writing
-- to instead.
AntiCheat:EnableNode("AntiFlyRaycastDistance")

This is a server only method.


:SetVerbose

AntiCheat:SetVerbose(isVerbose: boolean): ()

Enables or disables debug warnings in the Output. By default, this is set to false.

Warnings indicate when a player has violated a node's rules, allowing developers to diagnose unintended behavior (e.g., a player being teleported back after a script-triggered teleport).

This is a server only method.


:WaitUntilReady

AntiCheat:WaitUntilReady(): ()

Will yield the current thread until the whitelist has marked itself as ready on parallel luau, because the anticheat works by sending messages through bindable events - we need to make sure the other side (parallel luau) is set up before we start emitting events.

This is a server only method.


:InitializeDesyncLuau

AntiCheat:InitializeDesyncLuau(): ()

Responsible for initialising the library in parallel luau.


:InitializeSyncLuau

AntiCheat:InitializeSyncLuau(): ()

Responsible for initialising the library.

Warning

This function is called automatically when experience starts.