local player = game.Players.LocalPlayer local playerGui = player:WaitForChild('PlayerGui') local replicated = game:GetService('ReplicatedStorage') local first = game:GetService('ReplicatedFirst') local lighting = game:GetService('Lighting') local groupserv = game:GetService("GroupService") local camera = first:WaitForChild('Camera') local modules = replicated:WaitForChild('Modules') local resources = replicated:WaitForChild('Resources') local currentCamera = workspace.CurrentCamera currentCamera.CameraType = 'Scriptable' currentCamera.CoordinateFrame = camera.CFrame local loadGui = resources:WaitForChild('LoadGui') loadGui = loadGui:clone() loadGui.Parent = playerGui lighting:WaitForChild('Blur').Size = 12 first:RemoveDefaultLoadingScreen() local circle = loadGui.Circle local message = loadGui.Message local circleConnection local blacklistAllyID = {2997643} spawn(function() -- spin that circle right 'round currentCamera.CoordinateFrame = camera.CFrame circleConnection = game:GetService('RunService').RenderStepped:connect(function(step) circle.Rotation = circle.Rotation + 180*step end) end) -- Wait for database local com = replicated:WaitForChild('Replication') local client = require(modules:WaitForChild('Client')) local config = require(modules:WaitForChild('Configuration')) local displayMessageTable = config.loadMessages local finishedLoading = false spawn(function() local lastNo = 0 while true do if loadGui == nil or loadGui.Parent == nil or finishedLoading then break end local randomNo = lastNo while randomNo == lastNo do wait() randomNo = math.random(1,#displayMessageTable) end local htext = displayMessageTable[randomNo] for i = 1,string.len(htext),4 do if loadGui == nil or loadGui.Parent == nil or finishedLoading then break end message.Text = string.sub(htext,1,i) wait() end if loadGui == nil or loadGui.Parent == nil or finishedLoading then break end message.Text = htext wait( math.random(20,40)/10 ) for i = string.len(htext),1,-4 do if loadGui == nil or loadGui.Parent == nil or finishedLoading then break end message.Text = string.sub(htext,1,i) wait() end end end) local mainDivision = 0 -- 0 while loading -- 1 if true, 2 if false local divisions = {} -- divisions the player is in local labMember = 0 -- 0 while loading -- 1 if true, 2 if false spawn(function() -- get is LAB member if player:GetRankInGroup(1027684) > 0 then labMember = 1 else labMember = 2 end end) local divisions = {} local loadedDivisions = false local isally = false spawn(function() -- load all divisions for divisionID,divisionName in pairs(config.divisions) do if player:GetRankInGroup(divisionID) > 0 then divisions[divisionName] = true end end loadedDivisions = true end) local allies = {} local loadedAllies = false local pages = groupserv:GetAlliesAsync(1027684) spawn(function() while true do for i,groupPage in pairs(pages:GetCurrentPage()) do if not config.divisions[groupPage.Id] and not blacklistAllyID[groupPage.Id] then table.insert(allies, groupPage) end end if pages.IsFinished then loadedAllies = true break end pages:AdvanceToNextPageAsync() end end) local joinedTeam = false function joinTeam(team, data) if joinedTeam then return end joinedTeam = true if team then com.RemoteFunction:InvokeServer({type = 'teamChange', teamColor = game.Teams[team].TeamColor, divData = data}) end currentCamera.CameraType = 'Custom' game.Lighting.Blur.Size = .5 if circleConnection then circleConnection:disconnect() end loadGui:Destroy() client() end local joinedTeam = false function manageButtons(parent) for i,c in pairs(parent:GetChildren()) do if c.Active then c.ImageColor3 = Color3.new(1,1,1) c.TextLabel.TextColor3 = Color3.new(1,1,1) c.MouseButton1Click:connect(function() if joinedTeam then return end c.ImageColor3 = Color3.new(0,0.7,0) c.TextLabel.TextColor3 = Color3.new(0.6,0.6,0.6) if c.Name == 'Blades' or c.Name == 'Guards' or c.Name == 'Centurions' then joinTeam('Assassins', c.Name) else joinTeam(c.Name) end end) else c.ImageColor3 = Color3.new(0.2,0.2,0.2) c.TextLabel.TextColor3 = Color3.new(0.2,0.2,0.2) end end end -- Wait for assets while game.ContentProvider.RequestQueueSize > 0 do -- assetsNumber.Text = game.ContentProvider.RequestQueueSize wait() end -- Create choices if game.Teams:FindFirstChild('Assassins') then -- Wait for groups while labMember == 0 or loadedDivisions == false or loadedAllies == false do wait() end for _,group in pairs(allies) do if player:IsInGroup(group.Id) then isally = true break end end finishedLoading = true message.Text = 'What are you playing as?' circle:TweenPosition( circle.Position + UDim2.new(0,0,0.5,150) ) if labMember == 1 then loadGui.Member.Visible = true if divisions['Blades'] and divisions['Guards'] then loadGui.Member.Blades.Active = true loadGui.Member.Guards.Active = true elseif divisions['Blades'] then loadGui.Member.Blades.Active = true if divisions['Centurions'] then loadGui.Member.Guards.Visible = false loadGui.Member.Centurions.Position = loadGui.Member.Guards.Position loadGui.Member.Centurions.Active = true loadGui.Member.Centurions.Visible = true end elseif divisions['Guards'] then loadGui.Member.Guards.Active = true if divisions['Centurions'] then loadGui.Member.Blades.Visible = false loadGui.Member.Centurions.Position = loadGui.Member.Blades.Position loadGui.Member.Centurions.Active = true loadGui.Member.Centurions.Visible = true end elseif divisions['Centurions'] then loadGui.Member.Guards.Active = false loadGui.Member.Centurions.Position = loadGui.Member.Guards.Position loadGui.Member.Centurions.Visible = true loadGui.Member.Centurions.Active = true end manageButtons(loadGui.Member) else loadGui.Guest.Allies.Active = isally==true loadGui.Guest.Visible = true manageButtons(loadGui.Guest) end else circle:TweenPosition( circle.Position + UDim2.new(0,-150,0,0) ) joinTeam() end