Skip to content
Alexkist edited this page Aug 29, 2026 · 4 revisions

Anticheat _G API

The Anticheat has an _G API, which can be used by Server Scripts by using _G.OspryAC. This part of the Wiki goes into everything you need to know about the _G API.

Important

The _G API is a HEAVY Work in Progress. Behavior and/or features are subjected to change

Using the API

Settings

  • Behavior > API = true This has to be true to use the _G API. If not, the API Module will not be initialized.

Using the API within Scripts

-- You don't need to make it a local, I however recommend you do.
local OspryAC = _G.OspryAC

-- If you want to make sure the API exists, you can do this
while not _G.OspryAC do
    task.wait()
end

Functions

These are all functions you can use with the _G API

Note

ModeratorMessage is not shown to the Player.

Warning

Using .Warn() while Warnings is false WILL Kick the Player!

Function Description Usage
Kick Kicks the Player, not really more to say about this. _G.OspryAC.Kick(Player, Reason, ModeratorMessage)
Warn Gives the Player a Warning, which will also be displayed _G.OspryAC.Warn(Player, Reason, ModeratorMessage, DisplayReason (boolean))
GetWarns Gets a Players current Warnings (Only the amount of Warnings, reasons are not stored) _G.OspryAC.GetWarns(Player)

Clone this wiki locally