Sungmingamerpro13

New ToolScript + Stacks (Script)

Aug 1st, 2025
448
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.71 KB | None | 0 0
  1. local Tool = script.Parent;
  2.  
  3. enabled = true
  4.  
  5. function onActivated()
  6.     if not enabled  then
  7.         return
  8.     end
  9.  
  10.     enabled = false
  11.     wait(.8)
  12.     local Humanoid = Tool.Parent:FindFirstChild("Humanoid")
  13.     local EatAnim = script.EatAnim
  14.     Humanoid:LoadAnimation(EatAnim):Play()
  15.     script.healing:Play()
  16.     if (Humanoid ~= nil) then
  17.         if (Humanoid.MaxHealth > Humanoid.Health + 1.6) then
  18.             Humanoid.Health = Humanoid.Health + 1.6
  19.         else   
  20.             Humanoid.Health = Humanoid.MaxHealth
  21.             if Tool:WaitForChild("stacks") and Tool.stacks.Value > 1 then
  22.                 Tool.stacks.Value -= 1
  23.                 Humanoid:UnequipTools()
  24.             else
  25.                 Tool:Destroy()
  26.             end
  27.         end
  28.     end
  29.     enabled = true
  30.  
  31. end
  32.  
  33. script.Parent.Activated:connect(onActivated)
  34.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment