Advertisement
uNiQueEePAROTA

Sword Damage Script

Dec 30th, 2020
2,888
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local tool = script.Parent
  2.     local function onTouch (partOther)
  3.     local humanOther = partOther.Parent:FindFirstChild ("Humanoid")
  4.     if not humanOther then return end
  5.     if humanOther.Parent == tool then return end
  6.     humanOther:TakeDamage (5)
  7. end
  8.     local function slash()
  9.    
  10.     local str = Instance.new ("StringValue")
  11.     str.Name = "toolanim"
  12.     str.Value = "Slash"
  13.     str.Parent = tool
  14. end
  15.  
  16. tool.Activated:Connect (slash)
  17. tool.Handle.Touched:Connect (onTouch)
  18.  
  19. --made by GamerM8--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement