Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Infinite Health Script
- if player then
- local maxHealth = 100 -- Adjust this to match the maximum health value in your game
- local originalSetHealth = player.SetHealth -- Example: if there's a SetHealth function
- function player:SetHealth(newHealth)
- -- Intercept health setting and always set it to maxHealth instead
- originalSetHealth(self, maxHealth) -- Call original function with maxHealth
- end
- -- Optional: If game continuously checks health, you might also need to override the health check function
- local originalGetHealth = player.GetHealth
- function player:GetHealth()
- return maxHealth -- Always return maxHealth
- end
- --[[
- function OnHealthUpdated(newHealth)
- player.health = maxHealth
- end
- player.OnHealthUpdated:Connect(OnHealthUpdated)
- --]]
- print("Infinite Health script activated.")
- else
- print("Player object not found. Script failed to activate.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement