Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i, item in next, game:GetService("Players").LocalPlayer.Backpack:GetChildren() do
- if item:FindFirstChild("Ranged") then
- -- table.foreach(game.Players.LocalPlayer.Backpack:GetChildren(), print)
- local shoot = getsenv(item:FindFirstChild("Ranged")).shoot -- Gets the shoot function to get and modify its upvalues
- local tab = debug.getupvalue(shoot,2) -- Upvalue number 2 is the modulescript containing gun info
- -- Modify properties here
- rawset(tab,"fireMode",1) -- Automatic
- rawset(tab,"range",999999) -- Long bullet range
- rawset(tab, "reloadTime",0.01) -- (Almost) no reload
- rawset(tab, "magSize",math.huge) -- Inifite mag size (required for infinite ammo)
- rawset(tab, "minSpread",0) -- No spread
- rawset(tab, "maxSpread",0) -- No spread
- debug.setupvalue(shoot, 2, tab) -- Sets the new and modified table to upvalue number 2
- debug.setupvalue(shoot, 7, 0.07) -- This is the firerate upvalue
- debug.setupvalue(shoot, 3, math.huge) -- This is the ammo upvalue, Infinite ammo
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement