local GameManager = {} local Players = game.Players local Configurations = require(game.ServerStorage.Configurations) local TeamManager = require(script.TeamManager) local PlayerManager = require(script.PlayerManager) local MapManager = require(script.MapManager) local TimeManager = require(script.TimeManager) local DisplayManager = require(script.DisplayManager) local IntermissionRunning = false local EnoughPlayers = false local GameRunning = false local Events = game.ReplicatedStorage.Events local CaptureFlag = Events.CaptureFlag local ReturnFlag = Events.ReturnFlag function OnCaptureFlag(player) PlayerManager:AddPlayerScore(player, 1) TeamManager:AddTeamScore(player.TeamColor, 1) DisplayManager:DisplayNotification(player.TeamColor, 'Captured Flag!') end local function OnReturnFlag(flagColor) DisplayManager:DisplayNotification(flagColor, 'Flag Returned!') end function GameManager:Initialize() MapManager:SaveMap() end function GameManager:RunIntermission() IntermissionRunning = true TimeManager:StartTimer(Configurations.INTERMISSION_DURATION) DisplayManager:StartIntermission() EnoughPlayers = Players.NumPlayers >= Configurations.MIN_PLAYERS DisplayManager:UpdateTimerInfo(true, not EnoughPlayers) spawn(function() repeat if EnoughPlayers and Players.NumPlayers < Configurations.MIN_PLAYERS then EnoughPlayers = false elseif not EnoughPlayers and Players.NumPlayers >= Configurations.MIN_PLAYERS then EnoughPlayers = true end DisplayManager:UpdateTimerInfo(true, not EnoughPlayers) wait(.5) until IntermissionRunning == false end) wait(Configurations.INTERMISSION_DURATION) IntermissionRunning = false end function GameManager:StopIntermission() DisplayManager:UpdateTimerInfo(false, false) DisplayManager:StopIntermission() end function GameManager:GameReady() return Players.NumPlayers >= Configurations.MIN_PLAYERS end function GameManager:StartRound() TeamManager:ClearTeamScores() PlayerManager:ClearPlayerScores() PlayerManager:AllowPlayerSpawn(true) PlayerManager:LoadPlayers() GameRunning = true PlayerManager:SetGameRunning(true) TimeManager:StartTimer(Configurations.ROUND_DURATION) end function GameManager:Update() end function GameManager:RoundOver() local winningTeam = TeamManager:HasTeamWon() if winningTeam then DisplayManager:DisplayVictory(winningTeam) return true end if TimeManager:TimerDone() then if TeamManager:AreTeamsTied() then DisplayManager:DisplayVictory('Tie') else winningTeam = TeamManager:GetWinningTeam() DisplayManager:DisplayVictory(winningTeam) end return true end return false end function GameManager:RoundCleanup() PlayerManager:SetGameRunning(false) wait(Configurations.END_GAME_WAIT) PlayerManager:AllowPlayerSpawn(false) PlayerManager:DestroyPlayers() DisplayManager:DisplayVictory(nil) TeamManager:ClearTeamScores() PlayerManager:ClearPlayerScores() TeamManager:ShuffleTeams() MapManager:ClearMap() MapManager:LoadMap() end CaptureFlag.Event:connect(OnCaptureFlag) ReturnFlag.Event:connect(OnReturnFlag) return GameManager

Captcha

Hide Paste

No reason will result in disciplinary action.

Bump Paste

You do not have bump access.

Upgrade Required

VIP $50 $100
  • Preview Anonymous [VIP]
  • Primary color #9B318E
  • Secondary color #2D0A21
  • GIF profile photo YES
  • Higher limits (?) YES
  • Unlist pastes NO
  • Private pastes NO
  • Password protect pastes NO
  • Edit pastes NO
  • Mention users in pastes NO
  • Change username color NO
  • Transfer pastes NO
  • HTML in pastes NO
  • HTML in bio NO
  • Private profile NO
  • Pin pastes NO
  • Bump pastes NO
  • Username changes 1
Criminal $125 $250
  • Preview Anonymous [Criminal]
  • Primary color #780A48
  • Secondary color #2B021B
  • GIF profile photo YES
  • Higher limits (?) YES
  • Unlist pastes YES
  • Private pastes YES
  • Password protect pastes YES
  • Edit pastes YES
  • Mention users in pastes NO
  • Change username color NO
  • Transfer pastes NO
  • HTML in pastes NO
  • HTML in bio NO
  • Private profile NO
  • Pin pastes NO
  • Bump pastes NO
  • Username changes 2
Rich $250 $500
  • Preview Anonymous [Rich]
  • Primary color #FFD700
  • Secondary color #2B200D
  • GIF profile photo YES
  • Higher limits (?) YES
  • Unlist pastes YES
  • Private pastes YES
  • Password protect pastes YES
  • Edit pastes YES
  • Mention users in pastes YES
  • Change username color YES
  • Transfer pastes NO
  • HTML in pastes NO
  • HTML in bio NO
  • Private profile NO
  • Pin pastes NO
  • Bump pastes Weekly
  • Username changes 3
Elite $500 $1000
  • Preview Anonymous [Elite]
  • Primary color #FF7518
  • Secondary color #3B1F00
  • GIF profile photo YES
  • Higher limits (?) YES
  • Unlist pastes YES
  • Private pastes YES
  • Password protect pastes YES
  • Edit pastes YES
  • Mention users in pastes YES
  • Change username color YES
  • Transfer pastes YES
  • HTML in pastes YES
  • HTML in bio YES
  • Private profile YES
  • Pin pastes 100 hours
  • Bump pastes Daily
  • Username changes ∞

Select Currency

Welcome to Doxbin!
Doxbin allows anyone to publish information on whoever they want. We do not remove content unless it violates our Terms of Service.
By clicking this button, you agree to our Terms of Service.