I do know a bit about filtering enabled and if I want to make stuff secure then I should put it in the server if possible. I need help if this would be secure and I Roblox keeps blocking those notifications when someone is exploiting in my game.
This is the code
local players = game.Players
local kickMessage = "The NS Anti-Cheat system has determined that you are cheating. If you think you're not cheating then please open a support ticket on our discord server. This message has been logged in our discord server, and will stay there for a week."
local httpService = game:GetService("HttpService")
local webhook = [Redacted] -- I don't want anyone posting stuff in my discord server with this bot.
function sendMessage(Message)
local data = {
["content"] = Message
}
data = httpService:JSONEncode(data)
httpService:PostAsync(webhook, data)
end
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
print("Character has been added")
while true do
wait(0.1)
local succses, errorMessage = pcall(function()--pcall is used so the script wont crash.
local humanoid = character.Humanoid
--Anti Cheat if statments--
local function kickCheater (reasons)
warn("Cheater detected")
player:Kick(kickMessage)
end
if humanoid.MaxHealth > 100 then
sendMessage(tostring(player.UserId)..": This player has been caught using health hacks")
wait(1)
kickCheater()
elseif humanoid.WalkSpeed > 16 then
sendMessage(tostring(player.UserId)..": This player has been caught using speed hacks")
wait(1)
kickCheater()
elseif humanoid. then
end
end)
if errorMessage then
warn(errorMessage)
end
end
end)
end)
I don't have too much experience scripting because I have just started.

2 comments
I think you should just use sanity checks instead of an anticheat in my opinion.
Are you using a proxy server or are you using the official discord webhook link? Because if you're using the discord webhook link, you wouldn't be able to post it in-game since Discord has blocked Roblox's HTTP requests.