Basic Anti-Exploit

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.

5 Likes

humanoid property changes doesn’t replicate to the server. Your script wont do anything :skull:

20 Likes

This doesn’t work because none of the properties replicate to the server.

8 Likes

None of these are replicated to the server, so they will never flag.

2 Likes

humanoid properties can’t replicate to the server, you’ll have to find workarounds to make it look like it’s tracking them

image

5 Likes

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.

1 Like

I think setting their MaxHealth to 1000 won’t do anything :skull:

1 Like

You didn’t even test this script?

  • Using wait and not task.wait
  • Memory leaks with each new character spawned (infinite running loop)
  • No way to change walkspeed and other properties on server anymore
  • 3 syntax errors??
3 Likes

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.

1 Like

Read the replies. The anticheat does not work at all.

2 Likes

(editied code)

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.

1 Like

I have a question about how does your game work with humanoid stuff replicating to the server

4 Likes

u gotta make it cleint sided with a remote event which kicks and stuff

Thanks! This works well with my game! I can’t wait to recommend this highly advanced Anti-Cheat code to my coding friends!

1 Like

thats easily bypassable if you make it client-sided

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.

2 Likes

Good.

Okay…

Excellent.

Nope!

It should be (humanoid.RootPart.AssemblyLinearVelocity*xz).Magnitude > humanoid.WalkSpeed, where xz is a local variable: Vector3.new(1,0,1)

Nope!

It should be humanoid.RootPart.AssemblyLinearVelocity.Y > humanoid.JumpPower. If you’re using JumpHeight, I don’t know how to detect it.

Remove this. Roblox already prevents this.

Don’t forget the if not humanoid.RootPart then break end.

2 Likes

i cant tell if this is sarcasm or something else

1 Like

Your script is bypassed without even writing any form of cheats. The property window is very cool, give it a try.

2 Likes

Even if they were the exploiter could easily prevent the server from receiving these updates lol.

1 Like