
Keyless

local replicated_storage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local local_player = players.LocalPlayer
getgenv().settings = {
enabled = true,
max_distance = 7 -- 7 max
}
function closest_player()
local player = nil
local distance = settings.max_distance
for _, v in next, players:GetPlayers() do
local tool = local_player.Character and local_player.Character:FindFirstChildOfClass("Tool")
if v ~= local_player and tool and not local_player.Character:GetAttribute("stabDebounce") and not local_player.Character:GetAttribute("SafeZone") and v.Character and not (v.Character:GetAttribute("Protected") or v.Character:GetAttribute("SafeZone")) and v.Character:FindFirstChild("HumanoidRootPart") and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health > 0 and (v.Character:GetPivot().Position - local_player.Character:GetPivot().Position).Magnitude < settings.max_distance then
player = v
end
end
return player
end
if settings.enabled then
repeat
local silly = closest_player()
if silly then
local time_stamp = replicated_storage:WaitForChild("Modules"):WaitForChild("SynchronizedTime"):WaitForChild("Ping"):InvokeServer()
replicated_storage:WaitForChild("Remotes"):WaitForChild("Hitreg"):WaitForChild("SwingInit"):FireServer()
replicated_storage:WaitForChild("Remotes"):WaitForChild("Hitreg"):WaitForChild("RegisterHit"):FireServer(silly.Character.HumanoidRootPart, time_stamp)
replicated_storage:WaitForChild("Remotes"):WaitForChild("Eat"):FireServer(local_player.Character:FindFirstChildOfClass("Tool"))
end
task.wait()
until not settings.enabled
end
I approve of this,10/10 script.
dosent work well
@anonymousrobloxplaye they made it more near
-10/10
doesnt work