Advertisement
Sungmingamerpro13

New ToolScript styled Break In

Jun 27th, 2025
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.68 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.             else
  24.                 Tool:Destroy()
  25.             end
  26.         end
  27.     end
  28.     enabled = true
  29.  
  30. end
  31.  
  32. script.Parent.Activated:connect(onActivated)
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement