Just noticed this code only works in my game… sorry about that. I’m new to scripting.
Hello there! I created a pretty basic admin exploit but it can keep out more of the “dumb” exploiters. This code will send a Discord Webhook with the exploiters user and what they did that triggered the anti-exploit. This is a serversidded script. You can put it in ServerScriptService. This is pretty basic and could use some improvements to make it better.
local webhookUrl = "e" --url goes here, must be a proxy service. use like hyra or smth
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
local function sendDiscordMessage(player, reason)
local embed = {
["title"] = "Exploiter Detected!",
["color"] = 16711680, -- Red color
["fields"] = {
{
["name"] = "Player",
["value"] = player.Name,
["inline"] = true
},
{
["name"] = "Reason",
["value"] = reason,
["inline"] = true
}
}
}
local payload = HttpService:JSONEncode({
embeds = {embed}
})
HttpService:PostAsync(webhookUrl, payload, Enum.HttpContentType.ApplicationJson)
end
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
-- Check for WalkSpeed, JumpPower, and MaxHealth
while true do
wait(1)
if humanoid.WalkSpeed ~= 16 then
local message = "Flair Anti-Exploit has detected you tampering with your walkspeed. We have logged this action. Turn off your exploits!"
local player = Players:GetPlayerFromCharacter(character)
player:Kick(message)
sendDiscordMessage(player, " Tampering with walkspeed")
end
if humanoid.JumpPower ~= 50 then
local message = "Flair Anti-Exploit has detected you tampering with your jumppower. We have logged this action. Turn off your exploits!"
local player = Players:GetPlayerFromCharacter(character)
player:Kick(message)
sendDiscordMessage(player, " Tampering with jumppower")
wait(2)
end
if humanoid.MaxHealth ~= 100 then
local message = "Flair Anti-Exploit has detected you tampering with your max-health. We have logged this action. Turn off your exploits!"
local player = Players:GetPlayerFromCharacter(character)
player:Kick(message)
sendDiscordMessage(player, "Tampering with max health")
wait(2)
end
end
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(onCharacterAdded)
end)
Enjoy! Feel free to post suggestions in the comments. Make sure to put the script in ServerScriptService or Workspace.
This won’t work because (as far as I’m aware), pretty much all of these things that you are trying to detect, aren’t replicated to the server. So if a hacker changes their MaxHealth to 1000, the server won’t detect it, the server will think that it’s still 100.
Thanks for open-sourcing this! I am eager to implement it into my game. This is one of the few good, unobfuscated anticheats. Again, I appreciate your time and effort Mikey, and I hope you continue to contribute.
I noticed that there was some errors with the code. They should be fixed. Like I said before, it is simple. It turns out it only works in my game… so this code does’t work. Sorry about that… I’m pretty new to scripting.
nice anticheat, my biggest suggestion is maybe make it actually detect exploiters!
all seriousness, if your looking for an anticheat that actually works and is decent, just look up “anticheat” on the search, or you can try Eclipse, although it’s archived its still alright as it stands.