Advertisement
DanPanMan

Untitled

Jul 23rd, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. local oh_get_gc = getgc or false
  2. local oh_is_x_closure = is_synapse_function or issentinelclosure or is_protosmasher_closure or is_sirhurt_closure or checkclosure or false
  3. local oh_get_info = debug.getinfo or getinfo or false
  4. local oh_set_upvalue = debug.setupvalue or setupvalue or setupval or false
  5.  
  6. if not oh_get_gc and not oh_is_x_closure and not oh_get_info and not oh_set_upvalue then
  7. warn("Your exploit does not support this script")
  8. return
  9. end
  10.  
  11. local oh_find_function = function(name)
  12. for i,v in pairs(oh_get_gc()) do
  13. if type(v) == "function" and not oh_is_x_closure(v) then
  14. if oh_get_info(v).name == name then
  15. return v
  16. end
  17. end
  18. end
  19. end
  20.  
  21. local oh_GetAmmoData = oh_find_function("GetAmmoData")
  22. local oh_index = 2
  23. local oh_new_value = 240
  24.  
  25. oh_set_upvalue(oh_GetAmmoData, oh_index, oh_new_value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement