1. local UIS = game:GetService("UserInputService")
  2. local loopOn = true
  3. UIS.InputBegan:Connect(function(i,g)
  4. if i.KeyCode == Enum.KeyCode.P then
  5. if loopOn == true then
  6. loopOn = false
  7. else
  8. loopOn = true
  9. end
  10. print(loopOn)
  11. end
  12. end)
  13. while true do
  14. for i,v in pairs (game.Workspace.Areas["Forest Of Dao"].Ginseng:GetChildren()) do
  15. if loopOn == false then break end
  16. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.CFrame
  17. task.wait(0.3)
  18. local args = { v, "Ginseng" }
  19. game:GetService("ReplicatedStorage").Harvest.Harvest:FireServer(unpack(args))
  20. task.wait(9)
  21. end
  22. task.wait()
  23. end