2 Player Secret Hideout Tycoon Script | AUTO COLLECT MONEY

Created by iUseYahoo

Features:

--[[
------------------------
Enable and Disable
the script
------------------------
]]

getgenv().Status = false

--[[
------------------------
GAME REDIRECTING
CURRENT GAME CHECKER
------------------------
]]

local gameid = game.PlaceId

if gameid ~= 136258770 then
    local config = {
        Title = "Joining correct game",
        Text = "Joining...",
        Duration = 5,
        Button1 = "Ok",
    }

    game.StarterGui:SetCore("SendNotification", config)

    wait(1)

    local TeleService = game:GetService("TeleportService")

    local localplr = game:GetService("Players").LocalPlayer

    TeleService:Teleport(136258770, localplr)
end

--[[
------------------
CONFIGURATION
------------------
]]

-- change false to true to your team color

local TeamRed = false
local TeamBlue = false
local TeamGreen = false
local TeamYellow = false

-- if youre a team red builder
-- above change TeamRed = false to TeamRed = true
-- then do TeamRedBuilder = true

local TeamRedFighter = false
local TeamRedBuilder = false

local TeamBlueFighter = false
local TeamBlueBuilder = false

local TeamGreenFighter = false
local TeamGreenBuilder = false

local TeamYellowFighter = false
local TeamYellowBuilder = false

--[[
------------------
VARIABLES
------------------
]]

local plr = game.Players.LocalPlayer
local char = plr.Character
local teleportAway = -237.94455, 387.437683, -38.0877533, -0.614551485, -2.04025294e-08, 0.788876712, -2.09275814e-08, 1, 9.559737e-09, -0.788876712, -1.06343316e-08, -0.614551485

local TeamRedBuilderCollect = -202.316071, 53.3475189, 155.491333, 0.83130163, 3.93775217e-08, 0.555821538, -3.64153188e-08, 1, -1.63818914e-08, -0.555821538, -6.62212685e-09, 0.83130163
local TeamRedFighterCollect = -301.730774, 53.3475189, 155.011658, -0.818151116, 5.47965264e-08, -0.575003266, 7.88164201e-08, 1, -1.68472383e-08, 0.575003266, -5.91032858e-08, -0.818151116

local TeamBlueBuilderCollect = 371.002411, 53.2335205, 119.812065, -0.969982862, -2.53724997e-09, 0.243173271, 7.27925498e-09, 1, 3.94698105e-08, -0.243173271, 4.00551592e-08, -0.969982862
local TeamBlueFighterCollect = 371.75647, 53.2335205, 219.230255, -0.99993962, -4.99502981e-08, 0.0109875938, -5.09646583e-08, 1, -9.20388956e-08, -0.0109875938, -9.25933179e-08, -0.99993962

local TeamGreenBuilderCollect = -202.320053, 53.3475189, 155.43811, 0.0468293466, -8.05444174e-08, -0.998902917, 1.88249185e-08, 1, -7.97503503e-08, 0.998902917, -1.50696078e-08, 0.0468293466
local TeamGreenFighterCollect = -302.15863, 53.3475189, 155.577087, 0.253777266, -6.09658368e-09, -0.967262685, -1.05138042e-07, 1, -3.38876198e-08, 0.967262685, 1.10296014e-07, 0.253777266

local TeamYellowBuilderCollect = 176.719238, 69.2395172, -340.380951, 0.0783796906, 4.38267982e-08, 0.996923566, 2.13775819e-09, 1, -4.41301182e-08, -0.996923566, 5.59008662e-09, 0.0783796906
local TeamYellowFighterCollect = 276.055908, 69.2395172, -339.846252, -0.0227262191, 3.54162708e-08, -0.999741733, 3.93751343e-08, 1, 3.45303413e-08, 0.999741733, -3.85802181e-08, -0.0227262191

--[[
------------------
MAIN CODE
------------------
]]

-- Team Red Code
if TeamRed == true then
    if TeamRedBuilder == true then
        while true do
            wait(1)
            
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamRedBuilderCollect)
            
            if TeamRed == false or TeamRedBuilder == false or getgenv().Status == false then
                
                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)
                
                break
            end
        end
    end
    
    if TeamRedFighter == true then
        while true do
            wait(1)

            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamRedFighterCollect)

            if TeamRed == false or TeamRedFighter == false or getgenv().Status == false then

                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)

                break
            end
        end
    end
    
end


-- Team Blue Code

if TeamBlue == true then
    if TeamBlueBuilder == true then
        while true do
            wait(1)

            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamBlueBuilderCollect)

            if TeamBlue == false or TeamBlueBuilder == false or getgenv().Status == false then

                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)

                break
            end
        end
    end

    if TeamBlueFighter == true then
        while true do
            wait(1)

            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamBlueFighterCollect)

            if TeamBlue == false or TeamBlueFighter == false or getgenv().Status == false then

                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)

                break
            end
        end
    end

end


-- Team Green Code

if TeamGreen == true then
    if TeamGreenBuilder == true then
        while true do
            wait(1)

            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamGreenBuilderCollect)

            if TeamGreen == false or TeamGreenBuilder == false or getgenv().Status == false then

                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)

                break
            end
        end
    end

    if TeamGreenFighter == true then
        while true do
            wait(1)

            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamGreenFighterCollect)

            if TeamGreen == false or TeamGreenFighter == false or getgenv().Status == false then

                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)

                break
            end
        end
    end

end


-- Team Yellow Code

if TeamYellow == true then
    if TeamYellowBuilder == true then
        while true do
            wait(1)

            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamYellowBuilderCollect)

            if TeamYellow == false or TeamYellowBuilder == false or getgenv().Status == false then

                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)

                break
            end
        end
    end

    if TeamYellowFighter == true then
        while true do
            wait(1)

            plr.Character.HumanoidRootPart.CFrame = CFrame.new(teleportAway)
            wait(0.5)
            plr.Character.HumanoidRootPart.CFrame = CFrame.new(TeamYellowFighterCollect)

            if TeamYellow == false or TeamYellowFighter == false or getgenv().Status == false then

                local config = {
                    Title = "Auto Collector",
                    Text = "Auto collector was stopped.",
                    Duration = 5,
                    Button1 = "Dismiss",
                }

                game.StarterGui:SetCore("SendNotification", config)

                break
            end
        end
    end

end