Healing Pad with a Personal Cooldown thumbnail
0 views0 copies0 likes

Healing Pad with a Personal Cooldown

Universal script

Copy it, then test it in your own Studio place.

Combat & movement Verified

Script code

12 lines · 0.6 KB
Download
local prompt = Instance.new("ProximityPrompt", workspace:WaitForChild("MedStation"))prompt.ActionText = "Restore health"local last = {}prompt.Triggered:Connect(function(player)	local humanoid = player.Character and player.Character:FindFirstChildOfClass("Humanoid")	if not humanoid or humanoid.Health <= 0 or humanoid.Health >= humanoid.MaxHealth then return end	local now = os.clock()	if last[player] and now - last[player] < 8 then return end	humanoid.Health = math.min(humanoid.MaxHealth, humanoid.Health + 25)	last[player] = nowend)game:GetService("Players").PlayerRemoving:Connect(function(player) last[player] = nil end)

About this script

Create a part called MedStation in Workspace. Its prompt restores up to 25 health without exceeding MaxHealth. A player's cooldown starts only if healing happens, so using the station at full health does not waste the next recharge. Test with two players at different health values and adjust the heal amount or recharge duration for your arena.

Comments

Share what works, ask questions, or report an issue.

0

Log in to leave a comment.

No comments yet

Be the first to share your thoughts!

Raw Luau source

local prompt = Instance.new("ProximityPrompt", workspace:WaitForChild("MedStation"))
prompt.ActionText = "Restore health"
local last = {}
prompt.Triggered:Connect(function(player)
	local humanoid = player.Character and player.Character:FindFirstChildOfClass("Humanoid")
	if not humanoid or humanoid.Health <= 0 or humanoid.Health >= humanoid.MaxHealth then return end
	local now = os.clock()
	if last[player] and now - last[player] < 8 then return end
	humanoid.Health = math.min(humanoid.MaxHealth, humanoid.Health + 25)
	last[player] = now
end)
game:GetService("Players").PlayerRemoving:Connect(function(player) last[player] = nil end)