Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. --Made by Hacking101 @ V3rm--
  2. local AmmoIncrease = false
  3. local Settings = {
  4. ['Range']=5000,
  5. ['FireRate']=10000,
  6. ['Spread']=0,
  7. ['Zoom']=20,
  8. ['FireMode']="Auto",
  9. ['Dropoff']=0,
  10. ['Recoil']=0
  11. }
  12. local ModFunc,ModList,ModTable = nil,0,nil
  13. for _,a in pairs(debug.getregistry()) do
  14. if type(a) == "function" and pcall(function() return debug.getupvalues(a) end) then
  15. for i,v in pairs(debug.getupvalues(a)) do
  16. if type(v) == "table" then
  17. for ch,e in pairs(v) do
  18. if ch == "UUID" and ModTable == nil then
  19. ModTable = v
  20. ModFunc = a
  21. ModList = i
  22. end
  23. end
  24. end
  25. end
  26. end
  27. end
  28. RetMod = {}
  29. for i,v in pairs(ModTable) do
  30. if Settings[i] == nil then
  31. RetMod[i] = ModTable[i]
  32. else
  33. RetMod[i] = Settings[i]
  34. end
  35. end
  36. debug.setupvalue(ModFunc,ModList,RetMod)
  37. --Got lazy; Couldnt find the static ammo value in registry so I subbed for GUI
  38. --If yall know where it is then DM me on disc and ill fix this up
  39. local Plr = game.Players.LocalPlayer
  40. local GUI = Plr.PlayerGui:FindFirstChild("MainGui")
  41. local Ammo = nil
  42. if AmmoIncrease == true and GUI ~= nil then
  43. local GUIAmmo = GUI.Main.Ammo
  44. GUIAmmo.Changed:Connect(function(prop)
  45. if prop == "Text" then --filter text to find ammo in mag
  46. local A = GUIAmmo.Text
  47. local Pos = string.find(A,"/")-2
  48. Ammo = tonumber(string.sub(A,0,Pos))
  49. if Ammo == 0 then
  50. spawn(function() repeat wait() Reload:FireServer() until Ammo > 0 end)
  51. end
  52. if Ammo < 0 then
  53. Reload:FireServer()
  54. repeat wait() until Ammo > 0
  55. end
  56. if Ammo > 0 then
  57. RetMod['Magazine'] = Ammo
  58. debug.setupvalue(ModFunc,ModList,RetMod)
  59. end
  60. end
  61. end)
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement