
Keyless

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local Root = Character:WaitForChild("HumanoidRootPart")
LocalPlayer.CharacterAdded:Connect(function(char)
Character = char
Root = char:WaitForChild("HumanoidRootPart")
end)
local CombatHit = game:GetService("ReplicatedStorage")
:WaitForChild("Remotes")
:WaitForChild("Combat")
:WaitForChild("CombatHit")
local AliveFolder = workspace:WaitForChild("World"):WaitForChild("Alive")
local RUN = true -- set to false to stop
task.spawn(function()
while RUN do
local nearestTarget = nil
local shortestDistance = math.huge
if Root then
for _, target in ipairs(AliveFolder:GetChildren()) do
if target:IsA("Model")
and target ~= Character
and target:FindFirstChild("HumanoidRootPart")
and target:FindFirstChild("Humanoid")
and target.Humanoid.Health > 0 then
local distance = (Root.Position - target.HumanoidRootPart.Position).Magnitude
if distance < shortestDistance then
shortestDistance = distance
nearestTarget = target
end
end
end
end
if nearestTarget then
local args = {
{ nearestTarget },
1
}
CombatHit:FireServer(unpack(args))
end
task.wait(0.01)
end
end)

![Change stats [Works on old servers]](https://scriptblox.com/images/sb/rbx-9fcb86f99effadff38c5bc4debf7cd7c-cc57b59e047b.png)
Here's some more remotes for you maybe you can make something more interesting --Start Dialogue local Event = game:GetService("ReplicatedStorage").Remotes.NPC.StartDialogue Event:FireServer( workspace.World.Interactables.NPC["Starter Island"]["Scared Citizen"], -- NPC true ) --Get Quest? local Event = game:GetService("ReplicatedStorage").Remotes.NPC.SelectOption Event:FireServer( workspace.World.Interactables.NPC["Starter Island"]["Scared Citizen"], "Dialogue/Entry", "Callback/TryStartQuest" ) --Get Quest2? local Event = game:GetService("ReplicatedStorage").Remotes.Quest.GetQuestNPC Event:InvokeServer( "KillAlessios" -- QuestName ) --Complete Quest? local Event = game:GetService("ReplicatedStorage").Remotes.Quest.ConfirmComplete Event:FireServer() --Stun local Event = game:GetService("ReplicatedStorage").Remotes.Damage.RequestStun Event:FireServer( workspace.World.Alive.Alessio, -- En*y true, 1 -- Stun Time? ) --Knockback local Event = game:GetService("ReplicatedStorage").Remotes.Damage.RequestKnockbackLook Event:FireServer( workspace.World.Alive:GetChildren()[14], -- En*y 100, -- Force? 10 -- Time? ) --Custom Knocback into direction? local Event = game:GetService("ReplicatedStorage").Remotes.Damage.RequestKnockbackCustom Event:FireServer( workspace.World.Alive.Alessio, -- En*y Vector3.new(6.2467741966248, 25, -59.673927307129), -- Direction 0.15 -- Time? ) --Damage local Event = game:GetService("ReplicatedStorage").Remotes.Combat.CombatHit Event:FireServer( { workspace.World.Alive.Alessio }, 1 )
And also you can fire combathit event on anyone you don't have to be nearby
and also inf stat points local Event = game:GetService("ReplicatedStorage").Remotes.UI.UIRemoteEvent Event:FireServer( (function(bytes) --[[Type: buffer]] local b = buffer.create(#bytes) for i = 1, #bytes do buffer.writeu8(b, i - 1, bytes[i]) end return b end)({ 82, 69, 81, 85, 69, 83, 84, 95, 65, 80, 80, 76, 89, 95, 83, 84, 65, 84, 80, 79, 73, 78, 84 }), "Strength", -math.huge ) and afterwards do the same for others to up them
Love this ngl, super simple and easy yet super effective.