
Key RequiredUniversal

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local WeaponHit = ReplicatedStorage.WeaponsSystem.Network.WeaponHit
local damageInterval = 0.05
local maxDistance = 1000
local function getAnyWeapon()
local player = Players.LocalPlayer
local character = player.Character
if not character then return nil end
local weapon = character:FindFirstChildWhichIsA("Tool")
if weapon then
return weapon
end
local backpack = player:FindFirstChild("Backpack")
if backpack then
weapon = backpack:FindFirstChildWhichIsA("Tool")
if weapon then
return weapon
end
end
for _, child in pairs(character:GetChildren()) do
if child:IsA("Tool") or child:IsA("Model") then
return child
end
end
return character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Head") or character
end
local function createUniversalWeapon()
local player = Players.LocalPlayer
local character = player.Character
if not character then return nil end
local fakeWeapon = Instance.new("Part")
fakeWeapon.Name = "UniversalWeapon"
fakeWeapon.Parent = character
fakeWeapon.Anchored = true
fakeWeapon.CanCollide = false
fakeWeapon.Transparency = 1
fakeWeapon.Size = Vector3.new(0.1, 0.1, 0.1)
return fakeWeapon
end
local function getAllTargets()
local targets = {}
local player = Players.LocalPlayer
for _, targetPlayer in pairs(Players:GetPlayers()) do
if targetPlayer ~= player and targetPlayer.Character then
local character = targetPlayer.Character
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid and humanoid.Health > 0 then
local bodyParts = {
character:FindFirstChild("HumanoidRootPart"),
character:FindFirstChild("Head"),
character:FindFirstChild("Torso"),
character:FindFirstChild("UpperTorso"),
character:FindFirstChild("LowerTorso"),
character:FindFirstChild("Left Arm") or character:FindFirstChild("LeftUpperArm"),
character:FindFirstChild("Right Arm") or character:FindFirstChild("RightUpperArm"),
character:FindFirstChild("Left Leg") or character:FindFirstChild("LeftUpperLeg"),
character:FindFirstChild("Right Leg") or character:FindFirstChild("RightUpperLeg")
}
for _, part in pairs(bodyParts) do
if part then
table.insert(targets, {
player = targetPlayer,
part = part,
character = character
})
end
end
end
end
end
return targets
end
local function autoDamage()
while true do
local player = Players.LocalPlayer
local weapon = getAnyWeapon()
if not weapon then
weapon = createUniversalWeapon()
end
if weapon then
local targets = getAllTargets()
for _, target in pairs(targets) do
if target.part then
local hitData = {
p = target.part.Position + Vector3.new(
math.random(-10, 10),
math.random(-5, 5),
math.random(-10, 10)
),
pid = player.UserId,
part = target.part,
d = math.random(30, 100),
maxDist = maxDistance,
h = target.part,
m = target.part.Material or Enum.Material.Plastic,
sid = math.random(1000, 99999),
t = tick(),
n = Vector3.new(
math.random(-100, 100),
math.random(-100, 100),
math.random(-100, 100)
).Unit
}
WeaponHit:FireServer(weapon, hitData)
if #targets > 1 then
wait(0.01)
end
end
end
end
wait(damageInterval)
end
end
Players.LocalPlayer.CharacterAdded:Connect(function(character)
wait(2)
spawn(autoDamage)
end)
if Players.LocalPlayer.Character then
spawn(autoDamage)
end
Wow working like its