Advertisement
lafur

Untitled

Mar 22nd, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. tool - script.Parent
  2. player = game.Player.LocalPlayer
  3.  
  4. tool.Activated:connect(function)]
  5. function onTouched(hit)
  6. if not hit or not hit.Parent then return end
  7. local human = hit.Parent:findFirstChild("Humanoid")
  8. if human and human:IsA("Humanoid") then
  9. human:TakeDamage(20)
  10. end
  11. end
  12.  
  13. script.Parent.Touched:connect(onTouched)
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement