We made Game Guard public because we know how hard it is to make your own games anti-cheats but the main problem was, most of the anti-cheats out there are specific to certain games; the intention of Game Guard was to create an API in order for you to be able to customize the anti-cheat to work with your game, having very little false detections.
Not all of the functions have been listed in the above table, just the important ones. Please read the documentation for a full list of functions and features.
A quick demonstration of checking walk speed:
local gameGuard = require(game:GetService("ServerScriptService").GameGuard)
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
gameGuard:init(plr)
gameGuard:checkSpeed(plr, 16, function(plrToCheck, state, detectionType, data)
if state then
plrToCheck:Kick("You were detected for exploiting in this experience. Detection: " .. detectionType .. ".")
end
print(data)
end)
end)
Want to test it out yourself in the game?
You can test out Game Guard in our showcase game with the link provided below. Please keep in mind that the anti-cheat showcased in our showcase place is the pro version of Game Guard.
Thank you for considering to use Game Guard and reading this post! Hope you like it, feel free to leave any comments or suggestions on this post below.
I don’t think kicking is a good idea. What if the anti cheat false detected it? I think a better way to prevent high speeding characters would be teleporting them to their previous position.
In order to achieve this, you can use the data object that is passed in the function to get their last known position. Please keep in mind that you can design your own methods of punishments for when a player is detected.
local gameGuard = require(script.Parent.gameGuard)
local Players = game:GetService("Players")
local gameGuard = require(script.Parent.gameGuard)
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
gameGuard:init(plr)
local WalkSpeed = 16
gameGuard:checkSpeed(plr, WalkSpeed, function(plrToCheck, state, detectionType, data)
print(plrToCheck) -- Prints the player who was detected.
print(state) -- Prints a boolean, true or false based on whether or not the player was detected.
print(detectionType) -- Will print "speed".
print(data) -- Returns data table:
-- {
-- ["mag"] = mag, -- The magnitude between newPos and prevPos.
-- ["calc"] = calculatedSpeed, -- The calculated speed.
-- ["prevPos"] = prevPos -- The previous position.
-- ["newPos"] = newPos -- The new position at the check.
-- }
end)
end)
Our reasoning for developing a pro version is due to the amount of work and time our team put into this project. I feel that we are being fairly considerate open sourcing a various amount of functions included in our solution.
I still believe that the free version of Game Guard is a very useful resource that not only can help you secure your game by using simple functions that we have developed, but you can also learn a lot about working with methods to secure your game as you can read the source code.
In my opinion, I believe the formatting of the code is entirely preference based but we will take your opinion into consideration and make the code formatted in a way that makes it easier for the user to read in the next update.