Advertisement
Guest User

Untitled

a guest
May 27th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. local player = game:GetService("Players").LocalPlayer
  2. local currp
  3. workspace.Collectibles.ChildAdded:Connect(function(part)
  4. wait(0.5)
  5. if currp and (part.Position-currp).magnitude < 50 then
  6. player.Character:MoveTo(part.Position)
  7. wait(0.3)
  8. player.Character:MoveTo(currp)
  9. end
  10. end)
  11. local pollenLbl = player.Character:FindFirstChild("ProgressLabel",true)
  12. if not pollenLbl then
  13. error("pollen backpack not found")
  14. end
  15. local maxpollen = tonumber(pollenLbl.Text:match("%d+$"))
  16. local pollenTool = player.Character:FindFirstChildOfClass("Tool") or player.Backpack:FindFirstChildOfClass("Tool")
  17. if pollenTool==nil or pollenTool:FindFirstChild("ClickEvent")==nil then
  18. error("pollen tool not found")
  19. end
  20.  
  21. local fieldpos = {Vector3.new(77.6,175,-188.1),Vector3.new(77.6,175,-188.2),Vector3.new(77.6,175,-188.3)}
  22. local posIndex=0
  23. while true do
  24. --collect pollen
  25. pollenTool.Parent = player.Character
  26. wait(0.1)
  27. while player.leaderstats.Pollen.Value<maxpollen do
  28. posIndex=posIndex+1
  29. if posIndex>#fieldpos then posIndex=1 end
  30. for rot=1,4 do
  31. local angle = CFrame.Angles(0,math.pi*.5*rot,0)
  32. currp = fieldpos[posIndex]+angle.lookVector*4
  33. player.Character.HumanoidRootPart.CFrame=CFrame.new(currp)*angle
  34. for i=1,60 do
  35. wait(0.2)
  36. pollenTool.ClickEvent:FireServer(currp)
  37. end
  38. if player.leaderstats.Pollen.Value+1>maxpollen then break end
  39. end
  40. end
  41. --turn to honey
  42. currp=nil
  43. player.Character:MoveTo(player.SpawnPos.Value.p)
  44. wait(0.1)
  45. game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
  46. repeat wait(0.2) until player.leaderstats.Pollen.Value<1
  47. wait(7)
  48. game:GetService("ReplicatedStorage").Events.PlayerHiveCommand:FireServer("ToggleHoneyMaking")
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement