Advertisement
coastsss

Hydroxide Upvalue Scanner PF Ammo

Feb 17th, 2020
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.36 KB | None | 0 0
  1. --This was created with Hydroxide
  2.  
  3. local oh_get_gc = getgc or false
  4. local oh_is_x_closure = is_synapse_function or issentinelclosure or is_protosmasher_closure or is_sirhurt_closure or checkclosure or false
  5. local oh_get_info = debug.getinfo or getinfo or false
  6. local oh_set_upvalue = debug.setupvalue or setupvalue or setupval or false
  7.  
  8. if not oh_get_gc and not oh_is_x_closure and not oh_get_info and not oh_set_upvalue then
  9.     warn("Your exploit does not support this script")
  10.     return
  11. end
  12.  
  13. local oh_find_function = function(name)
  14.     for i,v in pairs(oh_get_gc()) do
  15.         if type(v) == "function" and not oh_is_x_closure(v) then
  16.             if oh_get_info(v).name == name then
  17.                 return v
  18.             end
  19.         end
  20.     end
  21. end
  22.  
  23. function PhantomForcesAmmo(infiniteammo)
  24.     if infiniteammo then
  25.         local oh_fireround = oh_find_function("fireround")
  26.         local oh_index = 1
  27.         local oh_new_value = 101
  28.  
  29.         local oh_shoot = oh_find_function("shoot")
  30.          local oh_index = 2
  31.         local oh_new_value = 101
  32.  
  33.         local oh_addammo = oh_find_function("addammo")
  34.         local oh_index = 3
  35.         local oh_new_value = 101
  36.  
  37.         oh_set_upvalue(oh_fireround, oh_index, oh_new_value)
  38.         oh_set_upvalue(oh_shoot, oh_index, oh_new_value)
  39.         oh_set_upvalue(oh_addammo, oh_index, oh_new_value)
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement