Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Flowers = workspace.Flowers:GetChildren()
- _G.Autofarming = false
- local ScreenGui = Instance.new("ScreenGui")
- local TextButton = Instance.new("TextButton")
- ScreenGui.Parent = Player:WaitForChild("PlayerGui")
- TextButton.Parent = ScreenGui
- TextButton.BackgroundColor3 = Color3.new(0.454902, 1, 0.956863)
- TextButton.BorderSizePixel = 0
- TextButton.Position = UDim2.new(0, 0, 0.460127592, 0)
- TextButton.Size = UDim2.new(0.106215581, 0, 0.0797448158, 0)
- TextButton.Font = Enum.Font.SourceSansBold
- TextButton.Text = "BEGIN AUTOFARMING"
- TextButton.TextColor3 = Color3.new(0.184314, 0.184314, 0.184314)
- TextButton.TextScaled = true
- TextButton.TextSize = 14
- TextButton.TextStrokeColor3 = Color3.new(1, 1, 1)
- TextButton.TextStrokeTransparency = 0.10000000149012
- TextButton.TextWrapped = true
- TextButton.MouseButton1Click:Connect(function()
- if _G.Autofarming == false then
- _G.Autofarming = true
- TextButton.Text = "STOP AUTOFARMING"
- elseif _G.Autofarming == true then
- _G.Autofarming = false
- TextButton.Text = "BEGIN AUTOFARMING"
- end
- end)
- local function findAvaliablePlot()
- for _,v in pairs(workspace.Honeycombs:GetChildren()) do
- if v.Owner.Value == nil then
- game:GetService("ReplicatedStorage").Events.ClaimHive:FireServer(v.HiveID.Value)
- end
- end
- end
- local function wep()
- if not Player.Character:FindFirstChildOfClass("Tool") then
- weapon = Player.Backpack:FindFirstChildOfClass("Tool")
- Player.Character.Humanoid:EquipTool(weapon)
- return weapon
- else
- weapon = Player.Character:FindFirstChildOfClass("Tool")
- return weapon
- end
- end
- while wait() do
- if _G.Autofarming then
- wep()
- if Player:FindFirstChild("Honeycomb") == nil then
- findAvaliablePlot()
- end
- wait()
- local gui = string.split(Player.PlayerGui.ScreenGui.MeterHUD.PollenMeter.Bar.TextLabel.Text, "/")
- local PollenCount = tonumber(gui[1])
- local MaxPollen = tonumber(gui[2])
- if PollenCount < MaxPollen then
- if _G.Autofarming then
- Player.Character:SetPrimaryPartCFrame(Flowers[math.random(1,#Flowers)].CFrame)
- local i = 20
- repeat
- if not _G.Autofarming then break end
- i = i - 1
- Player.Character:FindFirstChildOfClass("Tool").ClickEvent:FireServer()
- wait()
- until i == 0
- end
- elseif PollenCount == MaxPollen then
- if _G.Autofarming then
- Player.Character:SetPrimaryPartCFrame(workspace.Honeycombs[tostring(Player.Honeycomb.Value.Name)].SpawnPos.Value)
- wait(0.5)
- game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
- repeat
- if not _G.Autofarming then break end
- local gui2 = string.split(Player.PlayerGui.ScreenGui.MeterHUD.PollenMeter.Bar.TextLabel.Text, "/")
- local PollenCount2 = tonumber(gui2[1])
- local MaxPollen2 = tonumber(gui2[2])
- wait() until PollenCount2 == 0
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement