Hey! I’m making an Anti-cheat for my game but I cant fix this Error To ban a player if their jumpPower is increased. Basically I want to ban someone if their Jumpower is Increased.
Code: Nothing In Output Btw!
-- Players
local Needed_Age_To_Join = 0 -- Days
local Mods_And_Devs = {}
local Normal_Players = {}
local Banned_Players = {} -- BlackListed
-- Humanoid Stats
local Normal_Jump_Power = 50
-- Messages
local JumpPowerExploit = "Banned Due To JumpPower Increased"
local Banned = "Banned"
game.Players.PlayerAdded:Connect(function(PLAYER)
local function ModCheck(GroupID, RankNeeded)
if PLAYER:IsInGroup(GroupID) and PLAYER:GetRankInGroup(GroupID) >= RankNeeded then
table.insert(Mods_And_Devs, PLAYER.UserId)
print("Mod!")
end
end
ModCheck(14497374, 250)
PLAYER.CharacterAdded:Connect(function(CHARACTER)
local Humanoid = CHARACTER:FindFirstChild("Humanoid")
Humanoid.JumpPower.Changed:Connect(function()
if Humanoid.JumpPower > Normal_Jump_Power then
table.insert(PLAYER.UserId, Banned_Players)
PLAYER:Kick(JumpPowerExploit)
for I, Value in pairs(Mods_And_Devs) do
if Mods_And_Devs[I] then
print("Not Banned Because Mod!")
end
end
end
end)
end)
for I, Value in pairs(Banned_Players) do
if PLAYER.userId == Banned_Players[I] then
PLAYER:Kick(Banned)
elseif PLAYER.UserId == Mods_And_Devs[I] then
table.remove(PLAYER.UserId, Banned_Players)
end
end
end)