Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local gui = Instance.new("ScreenGui",player.PlayerGui)
- local act6 = false
- local act6temp = false
- local resethive = false
- local switchingzone = false
- local act4 = false
- local frame = Instance.new("Frame",gui)
- frame.BackgroundTransparency = 0.2
- frame.BackgroundColor3 = Color3.fromRGB(255,255,255)
- frame.BorderColor3 = Color3.fromRGB(155,155,155)
- frame.BorderSizePixel = 3
- frame.Position = UDim2.new(0.3,0,.3,0)
- frame.Size = UDim2.new(.25,0,.65,0)
- frame.Active = true
- frame.Draggable = true
- frame.ClipsDescendants = false
- local textbutc = Instance.new("TextButton",frame)
- textbutc.BackgroundTransparency = 0
- textbutc.BackgroundColor3 = Color3.fromRGB(255,55,55)
- textbutc.BorderColor3 = Color3.fromRGB(155,0,0)
- textbutc.BorderSizePixel = 3
- textbutc.Position = UDim2.new(0.925,0,0,0)
- textbutc.Size = UDim2.new(.075,0,.075,0)
- textbutc.SizeConstraint = "RelativeXX"
- textbutc.TextScaled = true
- textbutc.TextColor3 = Color3.fromRGB(255,255,255)
- textbutc.Font = "Highway"
- textbutc.Text = "X"
- textbutc.MouseButton1Click:Connect(function()
- gui:Remove()
- end)
- local textauto = Instance.new("TextButton",frame)
- textauto.BackgroundTransparency = 0
- textauto.BackgroundColor3 = Color3.fromRGB(55,255,155)
- textauto.BorderColor3 = Color3.fromRGB(0,155,55)
- textauto.BorderSizePixel = 3
- --uiscaletext.Position = UDim2.new(0.05,0,.9,0)
- textauto.Position = UDim2.new(0.05,0,.025,0)
- textauto.Size = UDim2.new(.4,0,.075,0)
- textauto.TextScaled = true
- textauto.TextColor3 = Color3.fromRGB(255,255,255)
- textauto.Font = "Highway"
- textauto.Text = "Auto Farm"
- textauto.MouseButton1Click:Connect(function()
- if act6 then
- act6 = false -- выключение
- resethive = false
- switchingzone = false
- textauto.Text = "Auto Farm"
- textauto.BackgroundColor3 = Color3.fromRGB(55,255,155)
- textauto.BorderColor3 = Color3.fromRGB(0,155,55)
- else
- act6 = true -- включено
- textauto.Text = "Stop"
- textauto.BackgroundColor3 = Color3.fromRGB(255,55,55)
- textauto.BorderColor3 = Color3.fromRGB(155,0,0)
- while true do
- wait(0.5)
- if resethive then
- print("Waiting 35 seconds before AutoFarm resumes")
- wait(35)
- resethive = false
- act6 = true
- end
- if act6 then
- local player = game:GetService("Players").LocalPlayer
- while player == nil do wait(0.5) end
- local root = player.Character.HumanoidRootPart
- if farmzoneswitched and not viciousbeedetected then act6 = false farmzoneswitchback = true end
- player = game:GetService("Players").LocalPlayer
- local currp
- player.Character.Humanoid.Died:connect(function()
- resethive = true
- act6 = false
- print("Player: " ..tostring(player.Name).. " has died")
- end)
- local pollenLbl = player.Character:FindFirstChild("ProgressLabel",true)
- if not pollenLbl then
- print("Backpack not found")
- end
- local maxpollen = tonumber(pollenLbl.Text:match("%d+$"))
- local pollenTool = player.Character:FindFirstChildOfClass("Tool") or player.Backpack:FindFirstChildOfClass("Tool")
- if pollenTool==nil or pollenTool:FindFirstChild("ClickEvent")==nil then
- print("Tool not found")
- end
- --print("Backpack size: " .. maxpollen)
- if act6 then
- if act6 == true then
- 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)}
- print("Farming Mountain Top Field")
- else
- if maxpollen < 9999 then
- 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)}
- print("Farming Sunflower Field")
- else
- 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)}
- print("Farming Mountain Top Field")
- end
- end
- end
- --collect pollen
- --print("Farming pollen")
- local posIndex = 0
- pollenTool.Parent = player.Character
- workspace.Collectibles.ChildAdded:Connect(function(part)
- if act6 then
- local root = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart
- if tostring(part) == tostring(game.Players.LocalPlayer.Name) or tostring(part) == "C" then
- -- print("token position: " ..tostring(part.Position)) --
- -- print("player position: " ..tostring(root.Position)) --
- -- print("Distance: " ..tostring((part.Position - root.Position).magnitude)) --
- if currp and (part.Position-root.Position).magnitude <= 60 then
- root.CFrame = CFrame.new(part.Position.x, root.Position.y, part.Position.z)
- wait(0.07) -- 7
- root.CFrame = CFrame.new(currp)
- wait(0.05)
- end
- end
- end
- end)
- wait(0.1)
- while act6 and tonumber(player.CoreStats.Pollen.Value) < tonumber(maxpollen) do
- wait(0.04)
- posIndex=posIndex+1
- if posIndex>#fieldpos then posIndex=1 end
- for rot=1,4 do -- 4
- local angle = CFrame.Angles(0,math.pi*.5*rot,0)
- currp = fieldpos[posIndex]+angle.lookVector*10
- local newrootpos = CFrame.new(currp)*angle
- root.CFrame = newrootpos
- for i=1,29 do --25
- if farmzoneswitched and not viciousbeedetected then act6 = false farmzoneswitchback = true end
- if not act6 then break end
- wait(0.1)
- pollenTool.ClickEvent:FireServer(currp)
- pollenTool.ClickEvent:FireServer(currp)
- end
- player = game:GetService("Players").LocalPlayer
- if tonumber(player.CoreStats.Pollen.Value+1) > tonumber(maxpollen) then
- print("Total Honey: " ..tostring(player.CoreStats.Honey.Value).. ". Bag Full: " ..tostring(player.CoreStats.Pollen.Value))
- break
- end
- end
- end
- -- turn pollen to honey --
- currp = nil
- --print("Teleporting back to Hive to make Honey")
- wait(0.1)
- game:GetService("Players").LocalPlayer.Character:MoveTo(game:GetService("Players").LocalPlayer.SpawnPos.Value.p)
- if not switchingzone then
- wait(1)
- game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
- if act6 then
- repeat wait(0.5) until game:GetService("Players").LocalPlayer.CoreStats.Pollen.Value < 1
- wait(8)
- end
- end
- end
- end
- end
- end)
- local textpollen = Instance.new("TextButton",frame)
- textpollen.BackgroundTransparency = 0
- textpollen.BackgroundColor3 = Color3.fromRGB(55,255,155)
- textpollen.BorderColor3 = Color3.fromRGB(0,155,55)
- textpollen.BorderSizePixel = 3
- textpollen.Position = UDim2.new(0.05,0,.125,0)
- textpollen.Size = UDim2.new(.4,0,.075,0)
- textpollen.TextScaled = true
- textpollen.TextColor3 = Color3.fromRGB(255,255,255)
- textpollen.Font = "Highway"
- textpollen.Text = "Token Farm"
- textpollen.MouseButton1Click:Connect(function()
- if act4 then
- act4 = false
- textpollen.Text = "Token Farm"
- textpollen.BackgroundColor3 = Color3.fromRGB(55,255,155)
- textpollen.BorderColor3 = Color3.fromRGB(0,155,55)
- else
- act4 = true
- textpollen.Text = "Stop"
- textpollen.BackgroundColor3 = Color3.fromRGB(255,55,55)
- textpollen.BorderColor3 = Color3.fromRGB(155,0,0)
- local krispy = player.Character.HumanoidRootPart
- repeat
- local bigboi = krispy.CFrame
- for k,v in pairs(workspace.Collectibles:GetChildren()) do
- if v.Name == player.Name and not v:FindFirstChild("HeyBigBoi") or tonumber((v.Position - krispy.Position).magnitude) <= 35 and not v:FindFirstChild("HeyBigBoi") then
- krispy.CFrame = v.CFrame
- local intvalue = Instance.new("IntValue",v)
- intvalue.Name = "HeyBigBoi"
- wait(.05)
- end
- end
- wait(.1)
- krispy.CFrame = bigboi
- until not act4
- end
- end)
- local uiscaletext = Instance.new("TextBox",frame)
- uiscaletext.BackgroundTransparency = 0
- uiscaletext.BackgroundColor3 = Color3.fromRGB(55,155,255)
- uiscaletext.BorderColor3 = Color3.fromRGB(0,55,155)
- uiscaletext.BorderSizePixel = 3
- uiscaletext.Position = UDim2.new(0.55,0,.025,0)
- uiscaletext.Size = UDim2.new(.2,0,.075,0)
- uiscaletext.TextScaled = true
- uiscaletext.TextColor3 = Color3.fromRGB(255,255,255)
- uiscaletext.Font = "Highway"
- uiscaletext.Text = ".6"
- uiscaletext.PlaceholderText = "UIScale"
- local ui = Instance.new("UIScale",frame)
- ui.Scale = .6
- uiscaletext.Changed:Connect(function()
- if uiscaletext.Text == "" then
- elseif tonumber(uiscaletext.Text) > 1.5 then
- ui.Scale = 1.5
- else
- ui.Scale = tonumber(uiscaletext.Text)
- end
- end)
- uiscaletext.Text = ".6"
Advertisement
Add Comment
Please, Sign In to add comment