How do I add another name onTouched function? I want to add different name on line 6, like skeleton. Thanks!
local debounce = false
function onTouched(hit)
if not debounce then
debounce = true
if hit.Parent.Name:sub(1,17) == "AFK Noob Lv 1 HP " or "Noob" then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 25
wait(0.5)
debounce = false
elseif hit.Parent.Name:sub(1,4) == "Noob" then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 25
wait(0.5)
debounce = false
end
end
end
script.Parent.Touched:connect(onTouched)

1 comment
http://wiki.roblox.com/?title=Scripting_Book