HackerTA

MC Infinity Ammo

May 30th, 2020
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. local CurrentFunctionIndex = 0;
  2.  
  3. --[[ If your gun is not supported, then enter it's Max ammo in here! ]]--
  4. local AmmoTable = {
  5. 14,
  6. 30,
  7. 4,
  8. 7,
  9. 40
  10. }
  11. local NewAmmo = math.huge; -- You can change this to anything, right now it is at infinite ammo!
  12.  
  13. function FunctionIndexPassed()
  14. CurrentFunctionIndex = CurrentFunctionIndex + 1;
  15. end
  16.  
  17. for i,v in next, getgc() do
  18. if typeof(v) == "function" and islclosure(v) and string.find(getfenv(v).script.Name, "Script") then
  19. for i2,v2 in next, getupvalues(v) do
  20. if table.find(AmmoTable, tonumber(v2)) then
  21. setupvalue(v, i2, NewAmmo)
  22. end
  23. end
  24. end
  25. end
Add Comment
Please, Sign In to add comment