Help me stop the hack that kills all players

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)
1 Like

You should check the magnitude (distance) from the player and the target (on the server-side, of course).

2 Likes

Just check if a player killed more than 4 players at once and if it turns true ban that player ez pz

2 Likes