Graizy

Untitled

Apr 17th, 2022 (edited)
571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1.  
  2.  
  3. _G.Enabled = true --// set to "false" to disable the script
  4.  
  5. local useGolden = true --// Set to "false" if you don't want to open golden eggs
  6.  
  7.  
  8. --// DON'T EDIT BELOW IF YOU DONT KNOW WHAT YOU'RE DOING
  9.  
  10. local event = workspace.__THINGS.__REMOTES:FindFirstChild("buy egg")
  11.  
  12. local rprint
  13.  
  14. local Normal_Eggs = {}
  15. local Golden_Eggs = {}
  16. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  17.  
  18. local Eggs = ReplicatedStorage:WaitForChild("Game").Eggs
  19.  
  20. if rconsolewarn then
  21. rconsoleclear()
  22. rprint = rconsolewarn
  23. else
  24. rprint = print
  25. end
  26.  
  27. function Time(Tick) -- Not By me
  28. if typeof(Tick) ~= "number" then
  29. return warn('Integer expected, got', typeof(Tick))
  30. end
  31. local Tick = tick() - Tick
  32. local Weeks = math.floor(math.floor(math.floor(math.floor(Tick / 60) / 60) / 24) / 7)
  33. local Days = math.floor(math.floor(math.floor(Tick / 60) / 60) / 24)
  34. local Hours = math.floor(math.floor(Tick / 60) / 60)
  35. local Minutes = math.floor(Tick / 60)
  36. local Seconds = math.floor(Tick)
  37. local MilliSeconds = (Tick * 1000)
  38. local Format = ""
  39. if Weeks > 0 then
  40. Format = Format .. string.format("%d Week/s, ", Weeks)
  41. end
  42. if Days > 0 then
  43. Format = Format .. string.format("%d Day/s, ", Days % 7)
  44. end
  45. if Hours > 0 then
  46. Format = Format .. string.format("%d Hour/s, ", Hours % 24)
  47. end
  48. if Minutes > 0 then
  49. Format = Format .. string.format("%d Minute/s, ", Minutes % 60)
  50. end
  51. if Seconds > 0 then
  52. Format = Format .. string.format("%d Second/s, ", Seconds % 60)
  53. end
  54. if MilliSeconds > 0 then
  55. Format = Format .. string.format("%d Ms", MilliSeconds % 1000)
  56. end
  57. return Format
  58. end
  59.  
  60. local startTick = tick()
  61.  
  62. for _,eggFolder in pairs(Eggs:GetChildren()) do
  63. for _,eggName in pairs(eggFolder:GetChildren()) do
  64. if string.find(eggName.Name, "Golden") then
  65. table.insert(Golden_Eggs, eggName.Name)
  66. else
  67. table.insert(Normal_Eggs, eggName.Name)
  68. end
  69. end
  70. task.wait()
  71. end
  72.  
  73. rprint("Added all eggs to database. Took "..tostring(Time(startTick)))
  74.  
  75.  
  76. while _G.Enabled == true and wait(0.05) do
  77. local args = {}
  78. local normalegg = Normal_Eggs[math.random(1, #Normal_Eggs)]
  79. local goldenegg = Golden_Eggs[math.random(1, #Golden_Eggs)]
  80. if useGolden == true then
  81. if math.random(1,2) == 1 then
  82. args = {normalegg, false}
  83. rprint("[Mastery Farm] Buying: "..normalegg)
  84. else
  85. args = {goldenegg, false}
  86. rprint("[Mastery Farm] Buying: "..goldenegg)
  87. end
  88. else
  89. args = {normalegg, false}
  90. rprint("[Mastery Farm] Buying: "..normalegg)
  91. end
  92. local e = event:InvokeServer(args)
  93. repeat wait() until e ~= nil
  94. rprint("Running Time: "..tostring(Time(startTick)))
  95. end
Add Comment
Please, Sign In to add comment