- You should have basic understanding of
Filtering Enabledand have worked with it before.
- You should know that spoon feeding isn't the way to go and you should be able to write the code yourself.
- You should be able to test the anti-exploiting yourself via using exploits or having someone test it out.
- You will be provided with test code to serve as a base for your anti-exploits.
Understanding the concept
Anti-Exploiting and it's limits:
You should realize that there's always a workaround between your anti-exploiting regardless of the security.
In general, the more successful effort you put in, the more you'll get out of the Anti-Exploit, this includes being lazy.
Exploiting and it's limits:
Exploiters would often use an '
explorer' to navigate through your game's files and attempt to find any vulnerabilities in it.
Exploiters cannot access
Exploiters can access
Preventing Lag from Anti-Exploits
Make sure to tick
StreamingEnabled (Property of Workspace) to ON, this is a ROBLOX way to prevent lag.
When making things like
Anti-Jumphacks, people would mistakenly directly navigate to the Humanoid never realizing that the exploiter is able to change the name of it, hence why it can be simply bypassed.
You should also note that exploiters can hack their speed not just by changing the WalkSpeed in the Humanoid, but by changing their FPS (frames per second). We should start coding now:
--[ Anti-Speedhack ]-- Humanoid = nil -- Premake 'Humanoid' so that you can use it as a Global Variable. Max_Walkspeed = 16 -- This will be the max walk speed your player can walk. KickMessage = 'Kicked for SpeedHacking' -- This will be the message when the player is kicked. game.Players.PlayerAdded:Connect(function(plr) -- When a player joins, the player is saved as 'plr'. plr.CharacterAdded:Connect(function(char) -- When the player spawns in-game, the character is saved as 'char'. -- First, we're going to set the global variable, Humanoid. for _,object in pairs(char:GetDescendants()) do if object:IsA("Humanoid") then Humanoid = object end end -- Secondly, we're going to do a ':GetPropertyChangedSignal' instead of a loop. Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function() if Humanoid.WalkSpeed >= Max_Walkspeed + 1 then -- Add +1 just to make sure it doesn't bug out. plr:Kick(KickMessage) end end) end) end)
KickMessage = 'Kicked for SpeedHacking' -- This will be the message when the player is kicked. -- Then, we're going to prevent the exploiter from changing their FPS. while wait() do -- This shouldn't affect lag/performance within the game. if game.Workspace:GetRealPhysicFPS() >= 65 then plr:Kick(KicKMessage) end end
Tips & Tricks
You should also use my methods of using
Local Variables conversion to
Global Variables method by premaking a global variable and setting it within a statement in order to be used freely.
Variable = nil -- Premake the variable if Humanoid then Variable = true else Variable = false end print(Variable)
If you're developing an Anti-Exploit that requires the
Humanoid then feel free to use my method of getting the humanoid whilst preventing a name change from the client.
char = thePlayerCharacter -- Make sure 'char' is a variable set to the player's character. Humanoid = nil -- Premake the variable for _,object in pairs(char:GetDescendants()) do if object:IsA("Humanoid") then Humanoid = object end end
Whilst developing an Anti-Fly, or an advanced Anti-Speedhack mechanism, you should definitely go for the player's position. Mess around and study the difference between the studs between a measured last position and current position and kick the player if they walked too fast (position-wise) or their
Position.Y is too high (flying)
char = thePlayerCharacter -- Make sure 'char' is a variable set to the player's character. HumanoidRootPart = nil -- Premake the variable KickMessage = 'Flying' -- This is the message the player will get when they recieve it. for _,object in pairs(char:GetDescendants()) do if object:IsA("BasePart") and object.Name == "HumanoidRootPart" then HumanoidRootPart = object end end while wait() do -- Shouldn't affect performance/lag local LastPosition = HumanoidRootPart.Position.Y wait(1) -- Time measured before the next position local CurrentPosition = HumanoidRootPart.Position.Y ---- if LastPosition-CurrentPosition >= 25 then plr:Kick(KickMessage) end end
When you're developing an advanced Anti-Noclip (huge issue for a lot of games), you should safely do a raycast through the last position and the next position, and if there's a part in between, they're noclipping. Make sure to set it to a good time or else it'll be detected when you go around corners.