Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. --[[
  2. -= This now functons differently! =-
  3. *READ BELOW*
  4.  
  5. https://v3rmillion.net/showthread.php?tid=677832 -- Make sure to check that you are always up-to-date!
  6.  
  7. *** Listed pets names are not the ones saved, they are the ones DELETED! ***
  8. *** DeletePets was made to prevent pets which people didn't know the names of from being deleted. ***
  9. *** Check Console (F9) to see what is being deleted and obtained! ***
  10.  
  11. Thread default amount is 1. If lets say you set the thread to 2, its as if you executed the script twice.
  12. If you set the threads to 20, it fires the Main() function 20 times making it about the same speed as executing
  13. the script 20 times with a thread of one.
  14.  
  15. Note: If you raise the thread to 2, your "Egg Purchase Amount" will remain the same, even with multiple threads (scripts)
  16. running it will stay the same. When you raise the threading I reccomend raising the "Egg Purchase Amount" to at LEAST
  17. above 100.
  18.  
  19. Using too high of threading can cause lagg spikes which could slow down the process of Buying and Deleting Eggs.
  20.  
  21. Have another update idea? Join the discord!
  22.  
  23. Last Update
  24. 11/10/2018
  25. --]]
  26.  
  27.  
  28. local DeletePets = {
  29. "Spike","Aesthetic Cat","Magic Fox", -- Any pet name here will be auto-deleted after purchase!
  30. }
  31.  
  32. local Settings = {
  33. ["Egg Purchase Amount"] = 1000000000000000000, -- Amount of Eggs you want the script to purchase! (Ends After)
  34. ["Egg Tier"] = "Tier 18", -- What tier of egg you want purchased! (Tier 1-17)
  35. ["Keep All Rainbow Pets"] = false, -- Keeps ALL rainbow pets no matter the type of pet it is when set to true!
  36. ["Threads"] = 5, -- How many threads of the autobuy function running? (More Threads means faster speeds but more lagg)
  37. }
  38.  
  39. local Directory = require(game:GetService("ReplicatedStorage")["1 | Directory"])
  40.  
  41. local CheckDeleters = function(Info)
  42. for _,Delete in pairs(DeletePets) do
  43. if string.lower(tostring(Delete)) == string.lower(Directory.Pets[Info].DisplayName) then
  44. return true
  45. end
  46. if string.lower(tostring(Delete)) == string.lower(Directory.Pets[Info].ReferenceName) then
  47. return true
  48. end
  49. end
  50. end
  51.  
  52. local CheckIfRainbow = function(Stats, PET_ID)
  53. for _,Pet in ipairs(Stats.Save.Pets) do
  54. for ID,Info in pairs (Pet) do
  55. if ID == "id" then
  56. if Info == PET_ID then
  57. if Pet.r == true then
  58. return true
  59. end
  60. end
  61. end
  62. end
  63. end
  64. end
  65.  
  66. local GetPurchasedPetInfo = function(Stats, PET_ID)
  67. for _,Pet in ipairs(Stats.Save.Pets) do
  68. for ID,Info in pairs (Pet) do
  69. if ID == "id" then
  70. if Info == PET_ID then
  71. return Pet.n
  72. end
  73. end
  74. end
  75. end
  76. end
  77.  
  78. local GetStats = function()
  79. return workspace["__REMOTES"]["Core"]["Get Stats"]:InvokeServer()
  80. end
  81.  
  82. local BuyEgg = function()
  83. return workspace["__REMOTES"]["Game"]["Shop"]:InvokeServer("Buy", "Eggs", Settings["Egg Tier"])
  84. end
  85.  
  86. local PrintPetInfo = function(PetInfo, PetID)
  87. warn(tostring("Pet Name: " .. Directory.Pets[PetInfo].DisplayName .. " - ID: " .. PetID))
  88. end
  89.  
  90. local DeletePet = function(PetID)
  91. workspace["__REMOTES"]["Game"]["Inventory"]:InvokeServer("Delete", PetID)
  92. end
  93.  
  94. local Main = (function()
  95. repeat
  96. wait()
  97. Settings["Egg Purchase Amount"] = Settings["Egg Purchase Amount"] - 1
  98. local EggPurchase,EggPurchaseInfo = BuyEgg()
  99. if EggPurchase == true and EggPurchaseInfo then
  100. wait()
  101. local Stats = GetStats()
  102. local PurchasedPetInfo = GetPurchasedPetInfo(Stats, EggPurchaseInfo.id)
  103. if PurchasedPetInfo then
  104. PrintPetInfo(PurchasedPetInfo, EggPurchaseInfo.id)
  105. if CheckDeleters(PurchasedPetInfo) == true then
  106. if CheckIfRainbow(Stats, EggPurchaseInfo.id) == true then
  107. if Settings["Keep All Rainbow Pets"] ~= true then
  108. warn(tostring("Deleting Pet: " .. Directory.Pets[PurchasedPetInfo].DisplayName .. " - ID: " .. EggPurchaseInfo.id))
  109. DeletePet(EggPurchaseInfo.id)
  110. end
  111. else
  112. warn(tostring("Deleting Pet: " .. Directory.Pets[PurchasedPetInfo].DisplayName .. " - ID: " .. EggPurchaseInfo.id))
  113. DeletePet(EggPurchaseInfo.id)
  114. end
  115. end
  116. end
  117. end
  118. until
  119. Settings["Egg Purchase Amount"] <= 0
  120. end)
  121.  
  122. for i=1,Settings["Threads"] do
  123. spawn(function()
  124. Main()
  125. end)
  126. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement