Hasli4

RBLX. DemonAttack

May 12th, 2025 (edited)
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. local rarm = script.Parent:FindFirstChild("RightHand")
  2. local larm = script.Parent:FindFirstChild("LeftHand")
  3. local sword = script.Parent:FindFirstChild("ClassicSword")
  4. local Attack_Speed = script.Parent.Parent.AttackSpeed
  5.  
  6. function dmg_hand(hit)
  7.     if hit.Parent ~= nil then
  8.         local hum = hit.Parent:findFirstChild("Humanoid")
  9.         if hum ~= nil then
  10.             hum.Health = hum.Health - 0.1
  11.         end
  12.         wait(Attack_Speed.Value)
  13.     end
  14. end
  15.  
  16. function dmg_sword(hit)
  17.     if hit.Parent ~= nil then
  18.         local hum = hit.Parent:findFirstChild("Humanoid")
  19.         if hum ~= nil then
  20.             hum.Health = hum.Health - 1
  21.         end
  22.         wait(Attack_Speed.Value)
  23.     end
  24. end
  25.  
  26. rarm.Touched:connect(dmg_hand)
  27. larm.Touched:connect(dmg_hand)
  28. larm.Touched:connect(dmg_sword)
Add Comment
Please, Sign In to add comment