
KeylessUniversal

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local localPlayer = Players.LocalPlayer
-- ═══════════════════════════════════════
-- SETTINGS
-- ═══════════════════════════════════════
local RADIUS = 20000
local KILL_KEY = Enum.KeyCode.F
local HIGHLIGHT_KEY = Enum.KeyCode.R
local HIGHLIGHT_DURATION = 5
local HIGHLIGHT_COLOR = Color3.fromRGB(255, 60, 60)
local FADE_SPEED = 1 / HIGHLIGHT_DURATION
-- ═══════════════════════════════════════
local highlightData = {}
local function getRootPart(character)
if not character then return nil end
return character:FindFirstChild("HumanoidRootPart")
end
local function getTool()
if not localPlayer.Character then return nil end
local char = localPlayer.Character
if char:FindFirstChild("Humanoid") and char:FindFirstChild("Hydra") then
return char.Hydra
end
return nil
end
local function createHighlightParts(character, rootPart)
local box = Instance.new("Part")
box.Name = "HighlightBox"
box.Anchored = false
box.CanCollide = false
box.Transparency = 0
box.Color = HIGHLIGHT_COLOR
box.Material = Enum.Material.Neon
box.Size = Vector3.new(1.8, 3.8, 1.8)
box.Parent = character
local halo = Instance.new("Part")
halo.Name = "HighlightHalo"
halo.Anchored = false
halo.CanCollide = false
halo.Transparency = 0
halo.Color = HIGHLIGHT_COLOR
halo.Material = Enum.Material.Neon
halo.Size = Vector3.new(4, 0.3, 4)
halo.Parent = character
return box, halo
end
local function attachToRoot(box, halo, rootPart, offsetBox, offsetHalo)
local connection
connection = RunService.Heartbeat:Connect(function()
if not rootPart or not rootPart.Parent then
connection:Disconnect()
return
end
box.CFrame = rootPart.CFrame * offsetBox
halo.CFrame = rootPart.CFrame * offsetHalo
end)
return connection
end
local function startFadeOut(data)
local box = data.box
local halo = data.halo
local connection = data.connection
local fadeStart = tick()
while true do
local elapsed = tick() - fadeStart
local alpha = math.max(0, 1 - (elapsed * FADE_SPEED))
if box and box.Parent then box.Transparency = 1 - alpha end
if halo and halo.Parent then halo.Transparency = 1 - alpha end
if alpha <= 0 then
if connection then connection:Disconnect() end
if box then box:Destroy() end
if halo then halo:Destroy() end
highlightData[data.player] = nil
break
end
task.wait(1/30)
end
end
local attackParams = {
attackCycleData = {
lungeMult = 1,
slowMult = 0.2,
slowTime = 1.5,
knockbackMult = 1,
attackTime = 0.65
},
knockback = 50,
shouldLock = true,
slowTime = 1.5,
shouldLunge = true,
isCritical = false,
weaponDefinition = {
attackCycle = {
["1"] = {
knockbackMul = 1,
slowMult = 0.2,
slowTime = 1.5,
lungeMul = 1,
attackTime = 0.65
},
["2"] = {
lungeMult = 1,
slowMult = 0.2,
slowTime = 1.5,
knockbackMult = 1,
attackTime = 0.65
},
["3"] = {
lungeMult = 0.75,
slowMult = 0.2,
slowTime = 1.5,
knockbackMult = 1.5,
attackTime = 0.7166666666666667
},
["4"] = {
lungeMult = 2.25,
slowTime = 1.5,
slowMult = 0.2,
hitboxOffsetAdd = Vector3.new(0, 0, -1.5),
hitboxSizeAdd = Vector3.new(0, 0, 3),
knockbackMult = 2.25,
attackTime = 0.9833333333333333
}
},
attackOrder = {"1", "2", "3", "4"}
},
attackCooldown = 0.1,
shouldSlow = true,
lungeKnockback = 55,
hitboxSize = Vector3.new(9, 14, 8),
slowMult = 0.2,
cycleIndex = 2,
hitboxOffset = Vector3.new(0, 0, -1.5),
damage = 100
}
local function findPlayersInRadius()
local myRoot = getRootPart(localPlayer.Character)
if not myRoot then return {} end
local results = {}
for _, player in ipairs(Players:GetPlayers()) do
if player == localPlayer then continue end
local char = player.Character or player.CharacterAdded:Wait(2)
if not char then continue end
local root = getRootPart(char)
if not root then continue end
local dist = (root.Position - myRoot.Position).Magnitude
if dist <= RADIUS then
table.insert(results, {
player = player,
char = char,
root = root,
distance = dist,
direction = (root.Position - myRoot.Position).Unit
})
end
end
return results
end
local function hitAll()
local currentTool = getTool()
if not currentTool then
warn("Инструмент 'Hydra' недоступен.")
return
end
attackParams.tool = currentTool
local targets = findPlayersInRadius()
if #targets == 0 then
warn("Нет целей в радиусе " .. RADIUS .. " студий.")
return
end
local hitTargets = {}
for _, t in ipairs(targets) do
table.insert(hitTargets, {
direction = Vector3.new(t.direction.X, t.direction.Y, t.direction.Z),
isClosestEnemy = false,
origin = Vector3.new(
localPlayer.Character.HumanoidRootPart.Position.X,
localPlayer.Character.HumanoidRootPart.Position.Y,
localPlayer.Character.HumanoidRootPart.Position.Z
),
enemyModel = t.char,
distance = t.distance,
knockback = 50
})
end
local args = {
"AttemptWeaponHit",
attackParams,
hitTargets
}
local events = ReplicatedStorage:FindFirstChild("Events")
if not events then
warn("Папка 'Events' не найдена.")
return
end
local func = events:FindFirstChild("GameRemoteFunction")
if not func then
warn("GameRemoteFunction не найден.")
return
end
func:InvokeServer(unpack(args))
print("[KILL] Удар по " .. #hitTargets .. " целям в радиусе " .. RADIUS)
end
local function highlightAll()
-- Убираем старые подсветки
for player, data in pairs(highlightData) do
startFadeOut(data)
end
highlightData = {}
local targets = findPlayersInRadius()
if #targets == 0 then
warn("Нет целей для подсветки в радиусе " .. RADIUS .. " студий.")
return
end
for _, t in ipairs(targets) do
local box, halo = createHighlightParts(t.char, t.root)
local offsetBox = CFrame.new(0, 1, 0)
local offsetHalo = CFrame.new(0, 3, 0) * CFrame.Angles(math.rad(90), 0, 0)
local connection = attachToRoot(box, halo, t.root, offsetBox, offsetHalo)
highlightData[t.player] = {
player = t.player,
box = box,
halo = halo,
connection = connection,
startTime = tick()
}
end
print("[HIGHLIGHT] Подсвечено " .. #targets .. " игроков на " .. HIGHLIGHT_DURATION .. " сек.")
-- Запуск исчезновения
task.delay(HIGHLIGHT_DURATION, function()
for _, t in ipairs(targets) do
local data = highlightData[t.player]
if data then
startFadeOut(data)
end
end
end)
end
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == KILL_KEY then
hitAll()
elseif input.KeyCode == HIGHLIGHT_KEY then
highlightAll()
end
end)No comments yet for this script.



