Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Tool = script.Parent;
- enabled = true
- function onActivated()
- if not enabled then
- return
- end
- enabled = false
- wait(.8)
- local Humanoid = Tool.Parent:FindFirstChild("Humanoid")
- local EatAnimTrack = Humanoid:LoadAnimation(script.Parent.EatAnimation)
- if (Humanoid ~= nil) then
- if (Humanoid.MaxHealth > Humanoid.Health + 1.6) then
- Humanoid.Health = Humanoid.Health + 1.6
- else
- if Humanoid.Health == Humanoid.MaxHealth then
- EatAnimTrack:Play()
- Tool:Destroy()
- end
- end
- end
- enabled = true
- end
- script.Parent.Activated:connect(onActivated)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement