Facebook
From DEBIL, 6 Months ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 109
  1. lua
  2. -- Red Dead Redemption 2 Infinity Health
  3. -- Created by: YourNameHere
  4. -- Last updated: 2022-03-01
  5.  
  6. -- Function to get the player's character
  7. function getPlayerCharacter()
  8.     local playerPed = PlayerPedId()
  9.     if playerPed then
  10.         return GetPlayerPedCharacter(playerPed)
  11.     end
  12.     return nil
  13. end
  14.  
  15. -- Function to set the player's character's health
  16. function setCharacterHealth(character, health)
  17.     if character then
  18.         SetCharacterHealth(character, health)
  19.     end
  20. end
  21.  
  22. -- Main loop
  23. while true do
  24.     -- Get the player's character
  25.     local playerCharacter = getPlayerCharacter()
  26.  
  27.     -- Set the player's character's health to infinity
  28.     setCharacterHealth(playerCharacter, 99999)
  29.  
  30.     -- Wait for a while before checking again
  31.     Wait(1000)
  32. end