
Keyless

--[[
PROJECT: GLEB'S MAGIC SWORD + TOTAL HITBOX
ADVICE: "Увеличить хитбокс всех"
MODEL: 12221720 | TEXTURE: 12224218
--]]
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Debris = game:GetService("Debris")
local lp = Players.LocalPlayer
-- 1. ПРЕДМЕТ
local tool = Instance.new("Tool")
tool.Name = "Gleb's OP Sword"
tool.RequiresHandle = true
tool.TextureId = "rbxassetid://12224215"
local handle = Instance.new("Part", tool)
handle.Name = "Handle"
handle.Size = Vector3.new(1, 1, 4)
local mesh = Instance.new("SpecialMesh", handle)
mesh.MeshId = "rbxassetid://12221720"
mesh.TextureId = "rbxassetid://12224218"
mesh.Scale = Vector3.new(1.2, 1.2, 1.2)
-- Поворот вперед
tool.Grip = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(180), 0)
-- 2. ЗВУКИ
local function createSound(id)
local s = Instance.new("Sound", handle)
s.SoundId = "rbxassetid://" .. id
s.Volume = 2
return s
end
local equipSound = createSound("12222225")
local attackSounds = {createSound("12222216"), createSound("12222208")}
-- 3. ТОТ САМЫЙ ХИТБОКС (ВЫПОЛНЯЕМ СОВЕТ)
-- Этот цикл работает постоянно и расширяет всех врагов
RunService.RenderStepped:Connect(function()
for _, player in pairs(Players:GetPlayers()) do
if player ~= lp and player.Character then
local root = player.Character:FindFirstChild("HumanoidRootPart")
if root then
root.Size = Vector3.new(20, 20, 20) -- ОГРОМНЫЙ ХИТБОКС 20x20
root.Transparency = 0.8 -- Почти невидимый, но ты его заметишь
root.Shape = Enum.PartType.Block
root.CanCollide = false -- Чтобы игроки не застревали в хитбоксах
end
end
end
end)
-- 4. ЛОГИКА УДАРА И АНИМАЦИИ
local db = false
tool.Activated:Connect(function()
if db then return end
db = true
-- Рандомный звук
attackSounds[math.random(1, #attackSounds)]:Play()
-- АНИМАЦИЯ ВНИЗ (90°)
tool.Grip = tool.Grip * CFrame.Angles(math.rad(-90), 0, 0)
-- Проверка касания (теперь она сработает очень легко!)
local connection = handle.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= lp.Character then
hit.Parent.Humanoid:TakeDamage(40)
-- Эффект попадания
local s = Instance.new("SelectionBox", hit)
s.Adornee = hit
s.Color3 = Color3.fromRGB(0, 255, 255)
Debris:AddItem(s, 0.2)
end
end)
task.wait(0.9) -- Ждем 0.9 сек внизу
-- АНИМАЦИЯ ВВЕРХ (ОБРАТНО)
tool.Grip = tool.Grip * CFrame.Angles(math.rad(90), 0, 0)
connection:Disconnect()
db = false
end)
tool.Equipped:Connect(function() equipSound:Play() end)
tool.Parent = lp.BackpackNo comments yet for this script.