0% found this document useful (0 votes)
35 views4 pages

Text

The document outlines a script for detecting and preventing cheating in a Roblox game, implementing checks for player speed, jump power, health, and abnormal behaviors. It includes mechanisms for detecting tampering, known exploit scripts, and validating developer identities. The script also features remote event handling for player actions and admin commands, ensuring that only authorized players can execute certain commands.

Uploaded by

johanmiguel0912
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

Text

The document outlines a script for detecting and preventing cheating in a Roblox game, implementing checks for player speed, jump power, health, and abnormal behaviors. It includes mechanisms for detecting tampering, known exploit scripts, and validating developer identities. The script also features remote event handling for player actions and admin commands, ensuring that only authorized players can execute certain commands.

Uploaded by

johanmiguel0912
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

-- Services

local Players = game:GetService("Players")


local StarterGui = game:GetService("StarterGui")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CheatEvent = ReplicatedStorage:WaitForChild("CheatEvent")
local Remote = game.ReplicatedStorage:WaitForChild("Remote")
local Workspace = game:GetService("Workspace")
local RunService = game:GetService("RunService")
local PlayersThatFiredRemote = {}

-- Configuration
local MAX_WALK_SPEED = 16
local MAX_JUMP_POWER = 50
local MAX_HEALTH = 100
local SEND_DELAY = 0.1
local ANTI_FLY_DETECTION_DELAY = 0.5
local BANNED_SCRIPTS = { "Xeno", "Delta", "Codex", "Arceus" } -- Updated list of
active exploits
local DEV_PLAYERS = {123456789, 987654321} -- Developer Roblox IDs for whitelisting
local CHEAT_LEVELS = {
[7] = "Hax Detected", -- Level 7 indicates advanced cheat usage
[2] = "Normal Player" -- Level 2 indicates normal player
}

-- Anti-Speed, Anti-Jump, Anti-Health checks


Players.PlayerAdded:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

-- Speed, Jump, and Health checks


while true do
wait(1)

-- Check WalkSpeed
if humanoid.WalkSpeed > MAX_WALK_SPEED then
local reason = "WalkSpeed exceeds " .. MAX_WALK_SPEED
CheatEvent:FireServer(reason)
player:Kick("Potential Cheats: " .. reason)
break
end

-- Check Jump Power


if humanoid.JumpPower > MAX_JUMP_POWER then
local reason = "JumpPower exceeds " .. MAX_JUMP_POWER
CheatEvent:FireServer(reason)
player:Kick("Potential Cheats: " .. reason)
break
end

-- Check Max Health


if humanoid.MaxHealth > MAX_HEALTH then
local reason = "Extra Health"
CheatEvent:FireServer(reason)
player:Kick("Potential Cheats: " .. reason)
break
end
end
end)
-- Anti-Fly detection and abnormal humanoid states
RunService.Heartbeat:Connect(function()
for _, player in pairs(Players:GetPlayers()) do
if player.Character then
local humanoid =
player.Character:FindFirstChildOfClass("Humanoid")
if humanoid then
-- Check for abnormal humanoid states (PlatformStanding
could indicate flying)
if humanoid:GetState() ==
Enum.HumanoidStateType.PlatformStanding then
local reason = "Flying detected"
CheatEvent:FireServer(reason)
player:Kick("Potential Cheats: " .. reason)
end
end
end
end
end)

-- Remote event checks for exploit detection


Remote.OnServerEvent:Connect(function(player, tick)
local playerLastTick = 0
local serverStartTick = workspace:GetServerTimeNow()

-- Ensure client is not sending outdated or pre-emptive remote signals


if tick - playerLastTick < SEND_DELAY then
player:Kick("Remote spam detected!")
end

-- Ensure tick is not ahead of the server time (anti-future manipulation)


if tick > workspace:GetServerTimeNow() then
player:Kick("Back from the future?")
end

-- Ensure tick is not behind server start time (anti-past manipulation)


if tick < serverStartTick then
player:Kick("Back from the past?")
end

-- Anti-network lag detection


if workspace:GetServerTimeNow() - tick > 5 then
player:Kick("Your internet connection is TOO unstable!")
end

-- Update the last valid tick


playerLastTick = tick
end)

-- Tamper Detection (checks if the player's environment has been tampered with)
local function checkForTamper(player)
local playerScriptCount = #player.Character:GetChildren()

-- Check for unexpected script additions (Tampering attempt detection)


for _, item in pairs(player.Character:GetChildren()) do
if item:IsA("Script") or item:IsA("LocalScript") then
CheatEvent:FireServer("Tamper detected: Suspicious script
found!")
player:Kick("Cheating detected: Tampered environment!")
return true
end
end

-- Check for other discrepancies in character model (anti-tamper check)


if playerScriptCount > 5 then -- arbitrary value to trigger tamper detection
CheatEvent:FireServer("Tamper detected: Too many scripts in
character!")
player:Kick("Cheating detected: Excessive scripts!")
return true
end

return false
end

-- Exploit detection with known script signatures (Xeno, Delta, Codex, Arceus)
function detectExploiters(player)
local userAgent = player.UserAgent or "Unknown"

-- Detect known exploiters by checking for known script signatures


for _, exploit in pairs(BANNED_SCRIPTS) do
if string.find(userAgent, exploit) then
CheatEvent:FireServer("Exploit detected: " .. exploit)
player:Kick("Exploit detected: " .. exploit)
break
end
end
end

-- Periodically check players for exploits and tampering


RunService.Heartbeat:Connect(function()
for _, player in pairs(Players:GetPlayers()) do
-- Check for tampering attempts
if checkForTamper(player) then
return
end

-- Detect exploits by matching known script names (Xeno, Delta, Codex,


Arceus)
detectExploiters(player)

-- Identity check and banning logic based on player level and Roblox ID
local userLevel = player:GetRankInGroup(123456) -- Modify to your group
ID
local userId = player.UserId

-- If player is an admin or developer, allow entry but ask for their ID


to avoid being banned
if userLevel >= 2 then
if not table.find(DEV_PLAYERS, userId) then
-- If not a developer, check if the player is faking their
identity (level-based check)
if userLevel == 7 then
CheatEvent:FireServer("HAX Detected: Level 7 player
with suspicious identity")
player:Kick("Hax Detected: Fake identity or exploit
detected.")
elseif userLevel == 2 then
CheatEvent:FireServer("Normal player with level 2
detected.")
end
end
end
end
end)

-- Remote event for player identity validation


Remote.OnServerEvent:Connect(function(player, tick)
wait(0.5)
if table.find(PlayersThatFiredRemote, player.UserId) then
return
else
table.insert(PlayersThatFiredRemote, player.UserId)
-- Add additional validation logic if required
wait(0.5)
table.remove(PlayersThatFiredRemote, player.UserId)
end
end)

-- Developer input for validation


local devInput = ReplicatedStorage:WaitForChild("DevInput")

devInput.OnServerEvent:Connect(function(player, devId)
-- Developer whitelist check
if table.find(DEV_PLAYERS, player.UserId) then
if player.UserId == devId then
-- Developer input accepted, bypassed for this player
CheatEvent:FireServer("Developer validated, bypass applied")
else
player:Kick("Developer ID mismatch!")
end
else
player:Kick("You are not a registered developer!")
end
end)

-- Admin command security


local adminRemote = ReplicatedStorage:WaitForChild("AdminRemote")
local admin = false
local command = "kick"

adminRemote.OnServerEvent:Connect(function(player, hacker, command)


if hacker then
-- Add ban functionality for detected hackers (IP, HWID, etc.)
player:Kick("You have been permanently banned!")
elseif player:GetRankInGroup(123456) > 10 then
-- Execute commands only if player is admin
-- Add your own admin command logic here
player:Kick("Command executed successfully!")
end
end)

-- End of script

You might also like