Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --drinking it gives you 100 shield
- --every time you get attacked you lose a bit of your shield depending on how strong the attack was
- --if shield is empty every time you get attacked you lose a bit of your health depending on how strong the attack was
- --if health is empty you die
- lp = game.Players.LocalPlayer
- char = lp.Character
- bp = lp.Backpack
- pg = lp.PlayerGui
- head = char.Head
- hum = char:FindFirstChildOfClass("Humanoid")
- tool = Instance.new("Tool",bp)
- tool.Name = "+100 Shield Potion"
- tool.CanBeDropped = false
- handle = Instance.new("Part",tool)
- handle.Name = "Handle"
- handle.Size = Vector3.new(2,2,2)
- handle.BrickColor = BrickColor.new("Electric blue")
- sparkles = Instance.new("Sparkles",handle)
- sparkles.SparkleColor = Color3.new(0,0,1)
- tool.Activated:connect(function()
- tool:Destroy()
- msg = Instance.new("Message",pg)
- count = 5
- head.Anchored = true
- for i=1, 50 do
- wait(0.1)
- count = count - 0.1
- msg.Text = "Drinking..."..tostring(count)
- end
- msg:Destroy()
- head.Anchored = false
- mh = hum.MaxHealth
- hum.MaxHealth = hum.MaxHealth + 100
- hum.Health = hum.MaxHealth
- repeat
- wait(0.01)
- if hum.Health < hum.MaxHealth then
- hum.MaxHealth = hum.Health
- end
- until hum.MaxHealth < mh+1
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement