Good morning. I am a developer of a game. One day, while managing the game, I met a hacker who killed all players. So I tried to protect the remote from hackers by changing the name of the remote, but it failed. However, we found a Features of hack that kills all players. The feature is that when the hacker kills all players, the hacker’s name appears in the Kill Log Gui. I came up with a way to stop this hack, and in just half a second, killing 3 or more players automatically banned the killers. But it didn’t work. I think this script works well. Please let me know if you have any problems with this script.
Script
--Server
local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local player = game:GetService('Players')
local plr = player:GetPlayerFromCharacter(script.Parent)
local k = plr:WaitForChild("Kill")
k.Changed:Connect(function(new)
print(new)
if new > 3 then
print("LOL")
plr.Ban.Value = true
plr:Kick()
end
end)
hum.Died:Connect(function()
local creator = hum:FindFirstChild("creator")
local cv
if creator ~= nil then
if creator.Value ~= nil then
local kill = creator.Value:findFirstChild("Kill")
if kill ~= nil then
kill.Value = kill.Value + 1
wait(0.5)
kill.Value = 0
end
end
end
if creator then
cv = creator.Value
end
game.ReplicatedStorage.OnKillEvent:FireAllClients(char, cv)
end)