function sub(...
)
[Link](...)()
end
local u3 = require([Link])
local TweenService = game:GetService("TweenService")
-- Função que checa os estados do jogador para ver se ele pode usar a habilidade
function ActionCheck(Parent)
if Parent:FindFirstChild("Stun") then
return true
end
if Parent:FindFirstChild("NoDam") then
return true
end
if Parent:FindFirstChild("ReturnStun") then
return true
end
if Parent:FindFirstChild("Action") then
return true
end
if Parent:FindFirstChild("Blocking") then
return true
end
if Parent:FindFirstChild("Immortal") then
return true
end
if Parent:FindFirstChild("SpellBlocking") then
return true
end
if Parent:FindFirstChild("ActiveCast") then
return true
end
if Parent:FindFirstChild("Unconscious") then
return true
end
if Parent:FindFirstChild("Knocked") then
return true
end
return
end
-- Controlador para saber se a habilidade pode ser usada
local canuse = true
-- Conexão ao ativar a skill
[Link]:Connect(function()
local p1 = [Link]
-- Verifica se o jogador está em algum estado que impede o uso da habilidade
if ActionCheck(p1) then
return
end
-- Verifica se a habilidade está em cooldown
if not canuse then
return
end
local p2 = [Link]:GetPlayerFromCharacter(p1)
local HumanoidRootPart = [Link]
canuse = false
-- Desativa armas equipadas e executa animação de "Meteor Rush"
[Link]:UnequipTools()
[Link]:LoadAnimation([Link]):Play()
-- Som e efeitos de rush
[Link]:Play()
[Link]:Emit(20)
-- Criação de acessório temporário "Action" para controlar o estado
local action = [Link]("Accessory")
[Link] = "Action"
[Link] = p1
[Link]:AddItem(action, 2)
-- Encontra o inimigo mais próximo
local closestEnemy = nil
local closestDistance = [Link]
for _, enemy in pairs([Link]:GetChildren()) do
if enemy:IsA("Model") and enemy ~= p1 and enemy:FindFirstChild("Humanoid")
then
local distance = ([Link] -
[Link]).Magnitude
if distance < closestDistance and distance <= 30 then -- Define o
alcance de busca
closestEnemy = enemy
closestDistance = distance
end
end
end
-- Se encontrar um inimigo próximo, faz o rush até ele
if closestEnemy then
local targetPosition = [Link]
local tweenInfo = [Link](0.2, [Link],
[Link])
local tween = TweenService:Create(HumanoidRootPart, tweenInfo, {CFrame =
[Link](targetPosition)})
tween:Play()
-- Após o rush, executa uma sequência de socos rápidos
[Link]:Wait() -- Espera o rush acabar
local punchCount = 5 -- Número de socos consecutivos
for i = 1, punchCount do
if not [Link] or [Link] <= 0 then
break end
-- Executa um soco
[Link]:LoadAnimation([Link]):Play()
[Link]:Play()
-- Aplica dano ao inimigo
local hit = [Link](p1,
[Link], 3, {
physical = true,
fist = true,
damage = 3, -- Dano por soco
})
-- Espera um pouco entre cada soco
wait(0.2)
end
end
-- Cooldown da habilidade
wait(8)
canuse = true
end)