Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game:GetService("Players").LocalPlayer
- local currp
- workspace.Collectibles.ChildAdded:Connect(function(part)
- wait(0.5)
- if currp and (part.Position-currp).magnitude < 50 then
- player.Character:MoveTo(part.Position)
- wait(0.3)
- player.Character:MoveTo(currp)
- end
- end)
- local pollenLbl = player.Character:FindFirstChild("ProgressLabel",true)
- if not pollenLbl then
- error("pollen 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
- error("pollen tool not found")
- end
- local fieldpos = {Vector3.new(77.6,175,-188.1),Vector3.new(77.6,175,-188.2),Vector3.new(77.6,175,-188.3)}
- local posIndex=0
- while true do
- --collect pollen
- pollenTool.Parent = player.Character
- wait(0.1)
- while player.leaderstats.Pollen.Value<maxpollen do
- posIndex=posIndex+1
- if posIndex>#fieldpos then posIndex=1 end
- for rot=1,4 do
- local angle = CFrame.Angles(0,math.pi*.5*rot,0)
- currp = fieldpos[posIndex]+angle.lookVector*4
- player.Character.HumanoidRootPart.CFrame=CFrame.new(currp)*angle
- for i=1,60 do
- wait(0.2)
- pollenTool.ClickEvent:FireServer(currp)
- end
- if player.leaderstats.Pollen.Value+1>maxpollen then break end
- end
- end
- --turn to honey
- currp=nil
- player.Character:MoveTo(player.SpawnPos.Value.p)
- wait(0.1)
- game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
- repeat wait(0.2) until player.leaderstats.Pollen.Value<1
- wait(7)
- game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement