Guest User

godly

a guest
Dec 5th, 2022
10,379
3
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 3 0
  1. ---------------------------------------------------------------------------------------
  2.  
  3. -- You can edit min and max, if you want more of each set max higher
  4. local WeaponOwnRange = {
  5. min=1,
  6. max=5
  7. }
  8.  
  9. local DataBase, PlayerData = getrenv()._G.Database, getrenv()._G.PlayerData
  10.  
  11. local newOwned = {}
  12.  
  13. for i,v in next, DataBase.Item do
  14. newOwned[i] = math.random(WeaponOwnRange.min, WeaponOwnRange.max) -- newOwned[Weapon]: ItemCount
  15. end
  16.  
  17. local PlayerWeapons = PlayerData.Weapons
  18.  
  19. game:GetService("RunService"):BindToRenderStep("InventoryUpdate", 0, function()
  20. PlayerWeapons.Owned = newOwned
  21. end)
  22.  
  23. game.Players.LocalPlayer.Character.Humanoid.Health = 0
  24.  
  25. --------------------------------------------------------------------------------
Comments
Add Comment
Please, Sign In to add comment