0 views0 copies0 likes
Healing Pad with a Personal Cooldown
Universal script
Copy it, then test it in your own Studio place.
Script code
12 lines ยท 0.6 KBlocal 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.
Log in to leave a comment.
No comments yet
Be the first to share your thoughts!
Comments
Share what works, ask questions, or report an issue.