local Players = game:GetService("Players")
local function setInfiniteHealth(humanoid)
humanoid.MaxHealth = math.huge
humanoid.Health = math.huge
humanoid.HealthChanged:Connect(function()
if humanoid.Health < humanoid.MaxHealth then
humanoid.Health = humanoid.MaxHealth
end
end)
end
local function onCharacterAdded(character)
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
setInfiniteHealth(humanoid)
end
end
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterAdded)
if player.Character then
onCharacterAdded(player.Character)
end
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do
onPlayerAdded(player)
end
Comments
Why You got inf health