xxxDrez

Untitled

Jun 18th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. local act6 = true
  2. local act6temp = false
  3. local resethive = false
  4. local switchingzone = false
  5.  
  6. while true do
  7. wait(0.5)
  8. if resethive then
  9. print("Waiting 35 seconds before AutoFarm resumes")
  10. wait(35)
  11. resethive = false
  12. act6 = true
  13. end
  14. if act6 then
  15. local player = game:GetService("Players").LocalPlayer
  16. while player == nil do wait(0.5) end
  17. local root = player.Character.HumanoidRootPart
  18. if farmzoneswitched and not viciousbeedetected then act6 = false farmzoneswitchback = true end
  19. player = game:GetService("Players").LocalPlayer
  20. local currp
  21. player.Character.Humanoid.Died:connect(function()
  22. resethive = true
  23. act6 = false
  24. print("Player: " ..tostring(player.Name).. " has died")
  25. end)
  26. local pollenLbl = player.Character:FindFirstChild("ProgressLabel",true)
  27. if not pollenLbl then
  28. print("Backpack not found")
  29. end
  30. local maxpollen = tonumber(pollenLbl.Text:match("%d+$"))
  31. local pollenTool = player.Character:FindFirstChildOfClass("Tool") or player.Backpack:FindFirstChildOfClass("Tool")
  32. if pollenTool==nil or pollenTool:FindFirstChild("ClickEvent")==nil then
  33. print("Tool not found")
  34. end
  35. if act6 then
  36. if act6 == true then
  37. fieldpos = {Vector3.new(93.2, 175.35, -188.49),Vector3.new(93.2, 175.35, -141.98),Vector3.new(59.12, 175.35, -141.98),Vector3.new(59.12, 175.35, -188.49)}
  38. print("Farming Mountain Top Field")
  39. else
  40. if maxpollen < 9999 then
  41. fieldpos = {Vector3.new(-220,3.3,220),Vector3.new(-220,4,180),Vector3.new(-220,4,140),Vector3.new(-220,4,100),Vector3.new(-190,4,126),Vector3.new(-190, 4, 166),Vector3.new(-190, 4, 206)}
  42. print("Farming Sunflower Field")
  43. else
  44. fieldpos = {Vector3.new(93.2, 175.35, -188.49),Vector3.new(93.2, 175.35, -141.98),Vector3.new(59.12, 175.35, -141.98),Vector3.new(59.12, 175.35, -188.49)}
  45. print("Farming Mountain Top Field")
  46. end
  47. end
  48. end
  49. local posIndex = 0
  50. pollenTool.Parent = player.Character
  51. workspace.Collectibles.ChildAdded:Connect(function(part)
  52. if act6 then
  53. local root = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart
  54. if tostring(part) == tostring(game.Players.LocalPlayer.Name) or tostring(part) == "C" then
  55. if currp and (part.Position-root.Position).magnitude <= 60 then
  56. root.CFrame = CFrame.new(part.Position.x, root.Position.y, part.Position.z)
  57. wait(0.07) -- 7
  58. root.CFrame = CFrame.new(currp)
  59. wait(0.05)
  60. end
  61. end
  62. end
  63. end)
  64. wait(0.1)
  65. while act6 and tonumber(player.CoreStats.Pollen.Value) < tonumber(maxpollen) do
  66. wait(0.04)
  67. posIndex=posIndex+1
  68. if posIndex>#fieldpos then posIndex=1 end
  69. for rot=1,4 do -- 4
  70. local angle = CFrame.Angles(0,math.pi*.5*rot,0)
  71. currp = fieldpos[posIndex]+angle.lookVector*10
  72. local newrootpos = CFrame.new(currp)*angle
  73. root.CFrame = newrootpos
  74. for i=1,29 do --25
  75. if farmzoneswitched and not viciousbeedetected then act6 = false farmzoneswitchback = true end
  76. if not act6 then break end
  77. wait(0.1)
  78. pollenTool.ClickEvent:FireServer(currp)
  79. pollenTool.ClickEvent:FireServer(currp)
  80. end
  81. player = game:GetService("Players").LocalPlayer
  82. if tonumber(player.CoreStats.Pollen.Value+1) > tonumber(maxpollen) then
  83. print("Total Honey: " ..tostring(player.CoreStats.Honey.Value).. ". Bag Full: " ..tostring(player.CoreStats.Pollen.Value))
  84. break
  85. end
  86. end
  87. end
  88. currp = nil
  89. wait(0.1)
  90. game:GetService("Players").LocalPlayer.Character:MoveTo(game:GetService("Players").LocalPlayer.SpawnPos.Value.p)
  91. if not switchingzone then
  92. wait(1)
  93. game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
  94. if act6 then
  95. repeat wait(0.5) until game:GetService("Players").LocalPlayer.CoreStats.Pollen.Value < 1
  96. wait(8)
  97. end
  98. end
  99. end
  100. end
Advertisement
Add Comment
Please, Sign In to add comment