InfMods

easy tool damage script for roblox

Sep 24th, 2022
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. step 1: create a tool using parts
  2. step 2: weld them together
  3. step 3: inset local script
  4. step 4: copy script and paste it into local script
  5.  
  6.  
  7. local tool = script.Parent
  8. local function onTouch (partOther)
  9. local humanOther = partOther.Parent:FindFirstChild ("Humanoid")
  10. if not humanOther then return end
  11. if humanOther.Parent == tool then return end
  12. humanOther:TakeDamage (5)
  13. end
  14. local function slash()
  15.  
  16. local str = Instance.new ("StringValue")
  17. str.Name = "toolanim"
  18. str.Value = "Slash"
  19. str.Parent = tool
  20. end
  21.  
  22. tool.Activated:Connect (slash)
  23. tool.Handle.Touched:Connect (onTouch)
  24.  
  25. --made by GamerM8--
Advertisement
Add Comment
Please, Sign In to add comment