local rep = game:GetService(“ReplicatedStorage”)
local Debris = game:GetService(“Debris”)
–//{ANIM}\–
local player = script.Player
local enemy = script.Enemy
rep.Stand.TW.BloodSuck.OnServerEvent:Connect(function(Player)
local char = Player.Character
local hum = char.Humanoid
local sucking = script.BloodSucking:Clone()
sucking.Parent = char
local healAmount = 2.2
local currenthp = hum.Health
local newhp = currenthp + healAmount
local ignorelist = {}
local Hitbox = script.Hitbox:Clone()
Hitbox.Parent = game.Workspace
Hitbox.CFrame = char.PrimaryPart.CFrame * CFrame.new(0,0,Hitbox.Size.Z/2 * -1)
Debris:AddItem(Hitbox,.3)
local Connection
Connection = Hitbox.Touched:Connect(function(hitpart)
if not hitpart:IsDescendantOf(char) then
if hitpart.Parent:FindFirstChild("Humanoid") then
local enemy = hitpart.Parent
if (table.find(ignorelist,enemy) == nil) then
table.insert(ignorelist,enemy)
char.Humanoid.WalkSpeed = 0
char.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
enemy.Humanoid.WalkSpeed = 0
enemy.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
Enemy.Backpack.Value.UsingMove.Value = true
--enemy.Humanoid:LoadAnimation(hitanim):Play()
sucking:Play()
local Blood = script.Blood:Clone()
Blood.Parent = enemy.UpperTorso
enemy.Humanoid:TakeDamage(1.1)
wait(0.5)
enemy.Humanoid:TakeDamage(1.5)
local Blood = script.Blood:Clone()
Blood.Parent = enemy.UpperTorso
humanoid.Health = newHealth
wait(0.5) -- 1
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5)
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5) --2
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5)
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5) --3
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5)
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5) --4
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5)
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5) --5
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5)
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.5) --6
enemy.Humanoid:TakeDamage(1.5)
humanoid.Health = newHealth
wait(0.8)
enemy.Humanoid:TakeDamage(8)
sucking:Destroy()
Blood:Destroy()
enemy.Humanoid.WalkSpeed = 16
Enemy.Backpack.Value.UsingMove.Value = false
enemy.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
char.Humanoid.WalkSpeed = 16
char.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
end
end
end
end)
end)
rep.Stand.TW.BloodSuck.OnServerEvent:Connect(function(Player)
local Character = Player.Character
local Stand = Character.Stand
local AnimControl = Stand:WaitForChild(“AnimationController”)
if Stand then
if Player.Backpack.Value.UsingMove.Value == false then
Player.Backpack.Value.UsingMove.Value = true
-- Character.Humanoid:LoadAnimation(Player):Play()
wait(1.25)
Player.Backpack.Value.UsingMove.Value = false
end
end
end)
i want to make it only hit 1 enemy