Advertisement
VORTEXTUR3

Fantastic Frontier: Fireflies Farm

Apr 9th, 2022
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.55 KB | None | 0 0
  1. repeat wait() until game:FindFirstChild("Players") ~= nil
  2. repeat wait() until game.Players.LocalPlayer ~= nil
  3.  
  4. local FirefliesFarm = false
  5. local mouse = game.Players.LocalPlayer:GetMouse()
  6. local root = game.Workspace[game.Players.LocalPlayer.Name].HumanoidRootPart
  7.  
  8. function checkTP()
  9.     if not game.Workspace.HOLE:FindFirstChild("HoleTPEntrance") then
  10.     repeat
  11.         local prevPos = root.CFrame
  12.             root.CFrame = CFrame.new(1304,96,-525)
  13.             wait()
  14.             root.CFrame = prevPos
  15.         wait(1)
  16.         until game.Workspace.HOLE:FindFirstChild("HoleTPEntrance")
  17.     end
  18. end
  19.  
  20. function goto(firefly)
  21. local hole = game.Workspace.HOLE.HoleTPEntrance
  22. if (root.Position - firefly.Position).magnitude < 200 then
  23. else
  24. hole.Size = Vector3.new(1,1,1)
  25. hole.Transparency = 1
  26. hole.CFrame = root.CFrame
  27. repeat hole.Position = root.Position wait() until (hole.Position - root.Position).magnitude < 10
  28. hole.Position = Vector3.new(1318,85,-527)
  29. hole.Size = Vector3.new(14,5,17)
  30. repeat wait() until (root.Position - Vector3.new(430,441,102)).magnitude < 10
  31. local preframe = root.CFrame
  32. for i=1, 5 do
  33. root.Anchored = true
  34. root.CFrame = firefly.CFrame + Vector3.new(0,3,0)
  35. wait(.1)
  36. end
  37. end
  38. wait()
  39. if firefly.Parent then
  40. repeat
  41. if not FirefliesFarm then return end
  42. root.Anchored = true
  43. root.CFrame = firefly.CFrame + Vector3.new(0,3,0)
  44. root.Anchored = false
  45. wait()
  46. firefly.CollectEvent:FireServer()
  47. wait(.08)
  48. until firefly.Parent == nil
  49. end
  50. root.Anchored = false
  51. end
  52.  
  53. mouse.KeyDown:Connect(function(key)
  54. if key == "f" then
  55. local currenttext = "FIREFLIES FARM is now turned OFF!"
  56. if FirefliesFarm then
  57. FirefliesFarm = false
  58. currenttext = "FIREFLIES FARM is now turned OFF!"
  59.     game.StarterGui:SetCore("SendNotification", {
  60.         Title = "notification";
  61.         Text = currenttext;
  62.         Icon = "rbxassetid://2541869220";
  63.         Duration = 3;
  64.     })
  65. else if not FirefliesFarm then
  66. FirefliesFarm = true
  67. currenttext = "FIREFLIES FARM is now turned ON!"
  68. checkTP()
  69.     game.StarterGui:SetCore("SendNotification", {
  70.         Title = "notification";
  71.         Text = currenttext;
  72.         Icon = "rbxassetid://2541869220";
  73.         Duration = 3;
  74.     })
  75. while FirefliesFarm do
  76. local fly = game.Workspace.Fireflies:FindFirstChild("FireflyServer")
  77. if fly and FirefliesFarm then
  78. goto(fly)
  79. end
  80. wait(.1)
  81. end
  82. end
  83. end
  84. end
  85. end)
  86.  
  87. game.StarterGui:SetCore("SendNotification", {
  88.     Title = "Loaded!";
  89.     Text = "Press F to toggle the script on / off! (Made by Aidez)";
  90.     Icon = "rbxassetid://2541869220";
  91.     Duration = 3;
  92. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement