Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
local Tool = script.Parent local number = 0 local player = game.Players.LocalPlayer local BackpackFrame = player.PlayerGui:WaitForChild("BackpackGui").Frame local QuantityText = BackpackFrame.QuantityText Tool:WaitForChild("stacks").Changed:Connect(function(value) QuantityText.Text = "Quantity: "..value end) QuantityText.Text = "Quantity: "..Tool.stacks.Value -- Create the Heal function local function Heal(player) -- Check if the player is alive if player.Character and player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health > 0 then -- Create a selection box on the player local selectionBox = Instance.new("SelectionBox") selectionBox.Adornee = player.Character selectionBox.LineThickness = 0.1 selectionBox.Parent = player.Character -- Wait for a short duration to show the selection box wait(3) -- Heal the player player.Character.Humanoid.Health = player.Character.Humanoid.MaxHealth -- Remove the selection box selectionBox:Destroy() Tool.stacks.Value -= 1 end end -- Handle equipped event Tool.Equipped:Connect(function(mouse) QuantityText.Visible = true -- Create a selection box for the local player local selectionBox = Instance.new("SelectionBox") selectionBox.Adornee = game.Players.LocalPlayer.Character selectionBox.LineThickness = 0.1 selectionBox.Parent = game.Players.LocalPlayer.Character -- Wait for a short duration to show the selection box wait(1) -- Remove the selection box selectionBox:Destroy() end) Tool.Unequipped:Connect(function() QuantityText.Visible = false end) -- Handle mouse button click Tool.Activated:Connect(function() -- Check if the player is healing themselves local humanoid = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") if humanoid and humanoid.Health >= number then Heal(game.Players.LocalPlayer) script.Parent.Handle.healed:Play() elseif humanoid and humanoid.Health >= humanoid.MaxHealth then Heal(game.Players.LocalPlayer) script.Parent.Handle.healed:Play() end while wait() do if Tool.stacks.Value == 0 then Tool:Destroy() QuantityText.Visible = false wait(1) break end end end)
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)