I’m making a anticheat for a game I’m a developer on and whenever I change my walkspeed it’s just won’t send the webhook or kick me (the webhook works I tested it)
local DSS = game:GetService("DataStoreService")
local HttpService = game:GetService("HttpService")
function sendWebhook(action,reason,plr)
local data = {
["embeds"] = {{
["title"] = "Potential Exploiter Found",
["color"] = "16726022",
["description"] = "```Exploiter Found```\nA exploiter has been found: our moderation team will review this log and determine if this is a true/false positive.\n\n**Username:** "..plr.Name.."\n**User ID:** "..plr.UserId.."\n**Reason:** "..reason.."\n**Action:** "..action,
["thumbnail"] = {url="http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..plr.UserId},
}
}}
local finaldata = HttpService:JSONEncode(data)
HttpService:PostAsync("no webhook for u", finaldata)
end
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
-- Character Related Exploits
local hum = char:FindFirstChildOfClass("Humanoid")
local CheckClientWalkspeed = game:GetService("ReplicatedStorage"):FindFirstChild("Remotes2").CheckClientWalkspeed:FireClient(hum,"WalkSpeed")
-- WS Exploit
while wait(0.1) do
if CheckClientWalkspeed ~= 16 then
if CheckClientWalkspeed == 14 or CheckClientWalkspeed == 18 then return end
plr:Kick("AntiExploit | Speed Hacks (Increased/Decreased WalkSpeed)")
sendWebhook("[KICK+LOG]","Speed Hacks", plr)
end
end
end)
end)
fixed server code (I cut out the webhook because I don’t have the full code, add it back)
local CheckClientWalkspeed = game:GetService("ReplicatedStorage").CheckClientWalkspeed
local function GetWalkSpeed(plr, hum)
return CheckClientWalkspeed:InvokeClient(plr, hum, "WalkSpeed")
end
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
-- Character Related Exploits
local hum = char:WaitForChild("Humanoid", 9e9)
-- WS Exploit
while wait(0.1) do
local CheckClientWalkspeed = GetWalkSpeed(plr, hum)
print(CheckClientWalkspeed)
if CheckClientWalkspeed ~= 16 then
if CheckClientWalkspeed == 14 or CheckClientWalkspeed == 18 then return end
plr:Kick("AntiExploit | Speed Hacks (Increased/Decreased WalkSpeed)")
end
end
end)
end)
fixed client code
game:GetService("ReplicatedStorage"):WaitForChild("CheckClientWalkspeed").OnClientInvoke = function(Hum, Property)
return Hum[Property]
end
You have to replace the remoteevent with a remotefunction as well
This method for detecting walkspeed is also extremely flawed, you should use a magnitude check on the server so you aren’t relying on the client to not lie.