Advertisement
Sungmingamerpro13

ToolScript (Script)

Jan 16th, 2025
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.92 KB | None | 0 0
  1. local Tool = script.Parent;
  2.  
  3. enabled = true
  4.  
  5.  
  6.  
  7.  
  8. function onActivated()
  9.     if not enabled  then
  10.         return
  11.     end
  12.  
  13.     enabled = false
  14.     Tool.GripForward = Vector3.new(-0.976,0,-0.217)
  15.     Tool.GripPos = Vector3.new(.95,-0.76,1.4)
  16.     Tool.GripRight = Vector3.new(0.217,0, 0.976)
  17.     Tool.GripUp = Vector3.new(0,1,0)
  18.  
  19.  
  20.     Tool.Handle.Eating:Play()
  21.  
  22.     wait(.8)
  23.    
  24.     local h = Tool.Parent:FindFirstChild("Humanoid")
  25.     if (h ~= nil) then
  26.         if (h.MaxHealth > h.Health + 1.6) then
  27.             h.Health = h.Health + 1.6
  28.         else   
  29.             if h.Health == h.MaxHealth then
  30.                 Tool:Destroy()
  31.             end
  32.         end
  33.     end
  34.  
  35.     Tool.GripForward = Vector3.new(-0.976,0,-0.217)
  36.     Tool.GripPos = Vector3.new(0.3,0,0)
  37.     Tool.GripRight = Vector3.new(0.217,0,-0.976)
  38.     Tool.GripUp = Vector3.new(0,1,0)
  39.  
  40.  
  41.     enabled = true
  42.  
  43. end
  44.  
  45. function onEquipped()
  46.     Tool.Handle.OpenSound:play()
  47. end
  48.  
  49. script.Parent.Activated:connect(onActivated)
  50. script.Parent.Equipped:connect(onEquipped)
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement