Advertisement
Anukun_Lucifer

Script Duck Attack

May 19th, 2022
753
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local enemy = script.Parent.Humanoid
  2. local anim = script.Parent.Humanoid.AnimationDuck
  3. local load = script.Parent.Humanoid:LoadAnimation(anim)
  4.  
  5. while wait() do
  6.     for i,v in pairs(game.Players:getChildren()) do
  7.         local character = game.Workspace:WaitForChild(v.Name)
  8.         enemy:MoveTo(character.PrimaryPart.Position)
  9.         load:Play()
  10.         enemy.MoveToFinished:Wait(1)
  11.         load:Stop()
  12.        
  13.         script.Parent.Head.Touched:Connect(function(hit)
  14.             if hit.Parent.Name == character.Name then
  15.                 character.Humanoid.Health = character.Humanoid.Health -1
  16.             end
  17.         end)
  18.     end
  19. end
Advertisement
RAW Paste Data Copied
Advertisement