Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. _G.autofarmbysamirdevsxd = true
  2. _G.autowalktobossxd = true
  3. local plr = game.Players.LocalPlayer
  4. local char = plr.Character
  5.  
  6. local function checkpets()
  7. local petsa = plr.PlayerGui.Gui.Submenus.PetsInventory.PetsFrame.Frame:GetChildren()
  8. local p = -1
  9. for i = 1,#petsa do
  10. p = p + 1
  11. end
  12. if p >= 148 then
  13. return true
  14. else
  15. return false
  16. end
  17. end
  18.  
  19. local function feitem()
  20. for i = 1,#plr.Backpack:GetChildren() do
  21. if char ~= nil then
  22. plr.Backpack:GetChildren()[i].Parent = char
  23. end
  24. end
  25. end
  26.  
  27. local function clickitem()
  28. if char ~= nil then
  29. for i = 1,#char:GetChildren() do
  30. if char:GetChildren()[i].ClassName == "Tool" then
  31. char:GetChildren()[i].RemoteClick:FireServer()
  32. game.ReplicatedStorage.Events.Clicked:FireServer()
  33. game.ReplicatedStorage.Events.UpdateData:InvokeServer()
  34. end
  35. end
  36. end
  37. end
  38.  
  39. coroutine.resume(coroutine.create(function()
  40.  
  41. while _G.autofarmbysamirdevsxd == true do
  42.  
  43. repeat
  44. game.ReplicatedStorage.Events.HatchEggs:InvokeServer(
  45. game.ReplicatedStorage.Eggs["Golden Egg"],
  46. 3
  47. )
  48. until checkpets() == true
  49.  
  50. local tabel = {}
  51. local whitelist = {"Deathspeaker","King Dominus","Pumpkin"}
  52. local pets = game.Players.LocalPlayer.PlayerGui.Gui.Submenus.PetsInventory.PetsFrame.Frame:GetChildren()
  53.  
  54. for i = 1,#pets do
  55. local pet = pets[i]
  56. local pnum = pet.Name
  57. local num = tostring(pet.Name)
  58. if pnum ~= "UIGridLayout" then
  59. local pnamecg = pet.IMG:GetChildren()
  60. local pname = "Error"
  61. for i = 1,#pnamecg do
  62. pname = pnamecg[i].Name
  63. end
  64. local addtotable = false
  65. local golden = pet.Golden.Visible
  66. local shiny = pet.Shiny.Visible
  67. local rainbow = pet.Rainbow.Visible
  68. local equipped = pet.Equipped.Visible
  69. local nwl1 = false
  70. local nwl2 = false
  71. local nwl3 = false
  72. for i = 1,#whitelist do
  73. if pname ~= whitelist[i] then
  74. if nwl1 == false then
  75. nwl1 = true
  76. elseif nwl2 == false then
  77. nwl2 = true
  78. elseif nwl3 == false then
  79. nwl3 = true
  80. end
  81. end
  82. end
  83. if golden == false and shiny == false and rainbow == false and equipped == false and nwl1 == true and nwl2 == true and nwl3 == true then
  84. addtotable = true
  85. end
  86. if shiny == true then
  87. game.ReplicatedStorage.Events.PetCommand:FireServer(num, "Combine")
  88. end
  89. if addtotable == true then
  90. table.insert(tabel, num)
  91. end
  92. end
  93. end
  94.  
  95. local sold = 0
  96.  
  97. repeat
  98. game.ReplicatedStorage.Events.PetCommand:FireServer(
  99. {
  100. unpack(tabel)
  101. },
  102. "DeleteMulti"
  103. )
  104. sold = sold + 1
  105. until sold == 10
  106.  
  107. tabel = {}
  108.  
  109. end
  110.  
  111. end))
  112.  
  113. while wait() do
  114.  
  115. if _G.autowalktobossxd == true and workspace:FindFirstChild("Boss") ~= nil then
  116. local bhrp = workspace.Boss.HumanoidRootPart
  117. char.Humanoid.WalkToPoint = Vector3.new(bhrp.Position.X,char.HumanoidRootPart.Position.Y,bhrp.Position.Z)
  118. feitem()
  119. clickitem()
  120. wait(0.55)
  121. end
  122.  
  123. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement