Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat wait() until game:FindFirstChild("Players") ~= nil
- repeat wait() until game.Players.LocalPlayer ~= nil
- local FirefliesFarm = false
- local mouse = game.Players.LocalPlayer:GetMouse()
- local root = game.Workspace[game.Players.LocalPlayer.Name].HumanoidRootPart
- function checkTP()
- if not game.Workspace.HOLE:FindFirstChild("HoleTPEntrance") then
- repeat
- local prevPos = root.CFrame
- root.CFrame = CFrame.new(1304,96,-525)
- wait()
- root.CFrame = prevPos
- wait(1)
- until game.Workspace.HOLE:FindFirstChild("HoleTPEntrance")
- end
- end
- function goto(firefly)
- local hole = game.Workspace.HOLE.HoleTPEntrance
- if (root.Position - firefly.Position).magnitude < 200 then
- else
- hole.Size = Vector3.new(1,1,1)
- hole.Transparency = 1
- hole.CFrame = root.CFrame
- repeat hole.Position = root.Position wait() until (hole.Position - root.Position).magnitude < 10
- hole.Position = Vector3.new(1318,85,-527)
- hole.Size = Vector3.new(14,5,17)
- repeat wait() until (root.Position - Vector3.new(430,441,102)).magnitude < 10
- local preframe = root.CFrame
- for i=1, 5 do
- root.Anchored = true
- root.CFrame = firefly.CFrame + Vector3.new(0,3,0)
- wait(.1)
- end
- end
- wait()
- if firefly.Parent then
- repeat
- if not FirefliesFarm then return end
- root.Anchored = true
- root.CFrame = firefly.CFrame + Vector3.new(0,3,0)
- root.Anchored = false
- wait()
- firefly.CollectEvent:FireServer()
- wait(.08)
- until firefly.Parent == nil
- end
- root.Anchored = false
- end
- mouse.KeyDown:Connect(function(key)
- if key == "f" then
- local currenttext = "FIREFLIES FARM is now turned OFF!"
- if FirefliesFarm then
- FirefliesFarm = false
- currenttext = "FIREFLIES FARM is now turned OFF!"
- game.StarterGui:SetCore("SendNotification", {
- Title = "notification";
- Text = currenttext;
- Icon = "rbxassetid://2541869220";
- Duration = 3;
- })
- else if not FirefliesFarm then
- FirefliesFarm = true
- currenttext = "FIREFLIES FARM is now turned ON!"
- checkTP()
- game.StarterGui:SetCore("SendNotification", {
- Title = "notification";
- Text = currenttext;
- Icon = "rbxassetid://2541869220";
- Duration = 3;
- })
- while FirefliesFarm do
- local fly = game.Workspace.Fireflies:FindFirstChild("FireflyServer")
- if fly and FirefliesFarm then
- goto(fly)
- end
- wait(.1)
- end
- end
- end
- end
- end)
- game.StarterGui:SetCore("SendNotification", {
- Title = "Loaded!";
- Text = "Press F to toggle the script on / off! (Made by Aidez)";
- Icon = "rbxassetid://2541869220";
- Duration = 3;
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement