Hello developers, I made a simple SERVER SIDED anti exploit system that is compatible with HD Admin, any features I should change? (Yes, I am cleaning up the “if HDRank == Admin or etc.”)
local hd = hdMain:GetModule("API")
game.Players.PlayerAdded:Connect(function(player)
local character = player.Character
player.CharacterAdded:Connect(function(character)
local hum = character.Humanoid
local character = player.Character
local rootPart = character.HumanoidRootPart
while true do
local Pos1 = rootPart.Position
wait(0.1)
local Pos2 = rootPart.Position
local difference = ((Pos1 - Pos2) * Vector3.new(1, 0, 1)).Magnitude
local rankId = hd:GetRank(player)
local HDRank = hd:GetRankName(rankId)
local isAdmin = false
if HDRank == "Mod" or HDRank == "Admin" or HDRank == "HeadAdmin" or HDRank == "Owner" then
isAdmin = true
-- Loops again
elseif difference > 5 then
rootPart.Position = Pos1
end
end
end)
end)```