Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Teleport failure handling


function Queue._onTeleportFailure(player, status, message)
	Log.Error.Queue("Teleport Failed: %s (%s)", player.Name, message)

	-- Add this player to the latest queue given that they failed out of the previous one
	Queue._addToQueue(player)
end

function Queue._sendStatus(forcePlayer)
	local waitTime = tick() - _lastTeleport
	local playerCount = Queue._currentQueueCount()

	local status = {
		enabled = Queue._timeoutEnabled,
		waiting_for = Conf.min_queue_players - playerCount,
		max_players = Conf.max_queue_players,
		current_players = playerCount,
		time_remaining = math.max(0, Conf.queue_time_limit - (tick() - _lastTeleport)),
	}

	if forcePlayer then
		Broadcast.fireRemoteClient(forcePlayer, "QUEUE_STATUS", status)
	else
		for player, time in pairs(_currentQueue) do
			Broadcast.fireRemoteClient(player, "QUEUE_STATUS", status)
		end
	end
end

function Queue.new(gameStageHandler)
	local self = setmetatable({
		gameStageHandler = gameStageHandler,
	}, Queue)

	for _, weaponInstance in pairs(WeaponsFolder:GetChildren()) do
		weaponInstance:Clone().Parent = StarterPack
	end

	return self
end

function Queue:playerAdded(player)
	Log.Debug.Queue("Added player %s", player.Name)
	Queue._addToQueue(player)

	----
	-- find the humanoid, and detect when it dies
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:FindFirstChild("Humanoid")

		if humanoid then
			local loading = nil

			humanoid.Died:Connect(function()
				if not loading then
					loading = true
					wait(3)
					Util.loadCharacter(player)
				end
			end)
		end
	end)

	--
	Util.loadCharacter(player)
end

function Queue:playerRemoving(player)
	Log.Debug.Queue("Removed player %s", player.Name)
	Queue._removeFromQueue(player)
end

function Queue:initialize()
	Log.Warn.Queue("STARTING")

	self.requestConn = Broadcast.registerHandler("QUEUE_STATUS_REQUEST", function(player)
		Queue._sendStatus(player)
	end)

	if not WeaponsSystem.doingSetup and not WeaponsSystem.didSetup then
		WeaponsSystem.setup()
	end

	DamageHandler.setup()

	for _, player in ipairs(Players:GetPlayers()) do
		self:playerAdded(player)
	end

	TeleportService.TeleportInitFailed:Connect(Queue._onTeleportFailure)

	if not Conf.disable_queue then
		spawn(function()
			while true do
				local waitTime = tick() - _lastTeleport
				local currentCount = Queue._currentQueueCount()

				if not Queue._timeoutEnabled or waitTime < Conf.queue_time_limit or currentCount < Conf.min_queue_players then
					wait(1)

				else
					Log.Debug.Queue("Queue is progressing.  Buckle up for fun.  *MAXIMUM* fun...")

					Queue._teleportQueue()
				end
			end
		end)
	end

	Log.Warn.Queue("STARTED")
end

function Queue:destroy()
	Broadcast.unregisterHandler(self.requestConn)
end
--[[**
	Gets a dictionary of the given group's information.
	@param [Integer] GroupID The group you are checking.
	@returns [Dictionary] The group's information.
**--]]


function GroupService:GetGroupInfoAsync(GroupID)
	local Success, GroupInfo = pcall(RbxGroupService.GetGroupInfoAsync, RbxGroupService, GroupID)
	return Success and GroupInfo or {}
end

return GroupService
-- NEW v12.0.0: Casters now use a data packet which can be made like what follows.
-- Check the API for more information: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/fcbehavior


local CastBehavior = FastCast.newBehavior()
CastBehavior.RaycastParams = CastParams
CastBehavior.MaxDistance = BULLET_MAXDIST
CastBehavior.HighFidelityBehavior = FastCast.HighFidelityBehavior.Default
-- A state object whose value is derived from other objects using a callback.


export type ComputedPairs<K, VI, VO> = PubTypes.ComputedPairs<K, VO> & {
	_oldDependencySet: Set<PubTypes.Dependency>,
	_processor: (K, VI) -> VO,
	_destructor: (VO) -> (),
	_inputIsState: boolean,
	_inputTable: PubTypes.CanBeState<{[K]: VI}>,
	_oldInputTable: {[K]: VI},
	_outputTable: {[K]: VO},
	_oldOutputTable: {[K]: VO},
	_keyData: {[K]: {
		dependencySet: Set<PubTypes.Dependency>,
		oldDependencySet: Set<PubTypes.Dependency>,
		dependencyValues: {[PubTypes.Dependency]: any}
	}}
}
--[[
	Creates a function that invokes a callback with correct error handling and
	resolution mechanisms.
]]


local function createAdvancer(callback, resolve, reject)
	return function(...)
		local resultLength, result = wpcallPacked(callback, ...)
		local ok = result[1]

		if ok then
			resolve(unpack(result, 2, resultLength))
		else
			reject(unpack(result, 2, resultLength))
		end
	end
end

local function isEmpty(t)
	return next(t) == nil
end

local function createSymbol(name)
	assert(type(name) == "string", "createSymbol requires `name` to be a string.")

	local symbol = newproxy(true)

	getmetatable(symbol).__tostring = function()
		return ("Symbol(%s)"):format(name)
	end

	return symbol
end

local PromiseMarker = createSymbol("PromiseMarker")

local Promise = {}
Promise.prototype = {}
Promise.__index = Promise.prototype

Promise.Status = {
	Started = createSymbol("Started"),
	Resolved = createSymbol("Resolved"),
	Rejected = createSymbol("Rejected"),
	Cancelled = createSymbol("Cancelled"),
}
---This function sets the position of the Plot


function module.SetCharVisibility(Char,Amount,Car)
	---Getting the player meshparts and decals
	for _,v in pairs(Char:GetDescendants()) do
		
		if v:IsA("MeshPart") or v:IsA("Part") or v:IsA("BasePart") then
			if Amount > 0 then
				v.CollisionGroupId = 3
			else
				v.CollisionGroupId = 0
			end
		end
		---Checking what the model is
		if v:IsA("MeshPart") or v:IsA("Decal") or v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
			v.Transparency = Amount
		end
		
		---Modifying name tag
	--	local Nametag = Char.HumanoidRootPart.NameTag
		local ExtendSize = nil
		
		if Car ~= nil then
			if Car:IsA("Model") then
				ExtendSize = Car:GetExtentsSize()
			elseif Car.Parent:IsA("Model") then
				ExtendSize = Car.Parent:GetExtentsSize()
			end
		end
		
		--if ExtendSize ~= nil then
		--	if ExtendSize.Y > 8 then
		--		Nametag.ExtentsOffsetWorldSpace = Vector3.new(0,4 + ExtendSize.Y - 8, 0)
		--		Nametag.MaxDistance = 40
		--	else
		--		Nametag.ExtentsOffsetWorldSpace = Vector3.new(0,4,0)
		--		Nametag.MaxDistance = 40
		--	end
		--else
		--	Nametag.ExtentsOffsetWorldSpace = Vector3.new(0,4,0)
		--	Nametag.MaxDistance = 85
		--end
		
		---Modifying camera zoom
		if Amount > 0 then
			game.Players:GetPlayerFromCharacter(Char).CameraMinZoomDistance = 10
		else
			game.Players:GetPlayerFromCharacter(Char).CameraMinZoomDistance = 0.5
		end
	end
	
end


return module
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	if plrData.Money.Gold.Value > 8 then
		return true
	end
	return false
end
--// Handling Settings		


	Firerate = 60 / 450; -- 60 = 1 Minute, 450 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 1; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--- Color ---



button.MouseEnter:Connect(function()
	local Color = Color3.fromRGB(60, 60, 60)
	TweenService:Create(button, Info, {BackgroundColor3 = Color}):Play()
end)

button.MouseLeave:Connect(function()
	local ColorColor = Color3.fromRGB(43, 43, 43)
	TweenService:Create(button, Info, {BackgroundColor3 = ColorColor}):Play()
end)
--This may seem odd, but it is necessary. If there are any _possible_ WeaponsSystem modules in the datamodel,
--we may have found them before they've been installed in ReplicatedStorage, so CollectionService's added signal
--won't run again for them. This means we should switch to waiting for Heartbeat instead of waiting for another
--weapons system to be added.


local anyPossible = searchForWeaponsSystem()
while not WeaponsSystemFolder do
	if anyPossible then
		RunService.Heartbeat:Wait()
	else
		CollectionService:GetInstanceAddedSignal(WEAPONS_SYSTEM_TAG):Wait()
	end
	anyPossible = searchForWeaponsSystem()
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 6000		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 500		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 9000		--		Use sliders to manipulate values
	Tune.Redline		= 9000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[=[
	@within TableUtil
	@function SwapRemove
	@param tbl table -- Array
	@param i number -- Index

	Removes index `i` in the table by swapping the value at `i` with
	the last value in the array, and then trimming off the last
	value from the array.

	This allows removal of the value at `i` in `O(1)` time, but does
	not preserve array ordering. If a value needs to be removed from
	an array, but ordering of the array does not matter, using
	`SwapRemove` is always preferred over `table.remove`.

	In the following example, we remove "B" at index 2. SwapRemove does
	this by moving the last value "E" over top of "B", and then trimming
	off "E" at the end of the array:
	```lua
	local t = {"A", "B", "C", "D", "E"}
	TableUtil.SwapRemove(t, 2) -- Remove "B"
	print(t) --> {"A", "E", "C", "D"}
	```

	:::note Arrays only
	This function works on arrays, but not dictionaries.
]=]


local function SwapRemove(t: Table, i: number)
	local n = #t
	t[i] = t[n]
	t[n] = nil
end
------------------------------------------------------------------------
-- subexpr -> (simpleexp | unop subexpr) { binop subexpr }
-- where 'binop' is any binary operator with a priority higher than 'limit'
-- * for priority lookups with self.priority[], 1=left and 2=right
-- * recursively called
-- * used in expr()
------------------------------------------------------------------------


function luaY:subexpr(ls, v, limit)
  self:enterlevel(ls)
  local uop = self:getunopr(ls.t.token)
  if uop ~= "OPR_NOUNOPR" then
    luaX:next(ls)
    self:subexpr(ls, v, self.UNARY_PRIORITY)
    luaK:prefix(ls.fs, uop, v)
  else
    self:simpleexp(ls, v)
  end
  -- expand while operators have priorities higher than 'limit'
  local op = self:getbinopr(ls.t.token)
  while op ~= "OPR_NOBINOPR" and self.priority[luaK.BinOpr[op] + 1][1] > limit do
    local v2 = {}  -- expdesc
    luaX:next(ls)
    luaK:infix(ls.fs, op, v)
    -- read sub-expression with higher priority
    local nextop = self:subexpr(ls, v2, self.priority[luaK.BinOpr[op] + 1][2])
    luaK:posfix(ls.fs, op, v, v2)
    op = nextop
  end
  self:leavelevel(ls)
  return op  -- return first untreated operator
end
-- Local private variables and constants


local ZERO_VECTOR2 = Vector2.new(0,0)
local ZERO_VECTOR3 = Vector3.new(0,0,0)

local tweenAcceleration = math.rad(220) -- Radians/Second^2
local tweenSpeed = math.rad(0)          -- Radians/Second
local tweenMaxSpeed = math.rad(250)     -- Radians/Second
local TIME_BEFORE_AUTO_ROTATE = 2       -- Seconds, used when auto-aligning camera with vehicles

local INITIAL_CAMERA_ANGLE = CFrame.fromOrientation(math.rad(-15), 0, 0)
local ZOOM_SENSITIVITY_CURVATURE = 0.5
local FIRST_PERSON_DISTANCE_MIN = 0.5

local cameraOffset = ZERO_VECTOR3
local CAMERA_OFFSET_SMOOTHNESS = 0.175
--[[Weight and CG]]


	Tune.Weight			= 2600		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 



input.InputBegan:connect(function(inputObject)
	
	if inputObject.UserInputType == Enum.UserInputType.Keyboard then
		if inputObject.KeyCode == CanToggleMouse.activationkey then
			if CanToggleMouse.allowed and freemouse == false then
				freemouse = true
			else
				freemouse = false
			end
		end
	end
	
end)
--- Cleans up all tasks.
-- @alias Destroy


function Maid:DoCleaning()
	local tasks = self._tasks

	-- Disconnect all events first as we know this is safe
	for index, job in pairs(tasks) do
		if typeof(job) == "RBXScriptConnection" then
			tasks[index] = nil
			job:Disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local index, job = next(tasks)
	while job ~= nil do
		tasks[index] = nil
		if type(job) == "function" then
			job()
		elseif type(job) == "thread" then
			local cancelled
			if coroutine.running() ~= job then
				cancelled = pcall(function()
					task.cancel(job)
				end)
			end

			if not cancelled then
				local toCancel = job
				task.defer(function()
					task.cancel(toCancel)
				end)
			end
		elseif typeof(job) == "RBXScriptConnection" then
			job:Disconnect()
		elseif job.Destroy then
			job:Destroy()
		end
		index, job = next(tasks)
	end
end
-- Basic settings


local ROTATION_SPEED = 0.1
local tweenService = game:GetService("TweenService")

while true do
	
	-- Wait
	local waitTime = wait()
	
	-- Tween to rotate
	local goal = {
		CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, ROTATION_SPEED)
	}
	tweenService:Create(script.Parent, TweenInfo.new(waitTime, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), goal):Play()
	
end
-- update bruv


wait(1)
RunService.RenderStepped:Connect(function()

	for i,v in pairs(workspace.Map:GetChildren()) do

		local CamPos = workspace.CurrentCamera.CFrame.Position
		local vPos = v:GetPivot().Position

		CamPos = Vector3.new(CamPos.X, 0, CamPos.Z)
		vPos = Vector3.new(vPos.X, 0, vPos.Z)
		local dist = (CamPos - vPos).Magnitude

		dist = dist - 3000
		if dist < 0 then
			dist = 0
		end
		dist = dist*dist/3000
		local currentPos = CFrame.new(v:GetAttribute("OriginalPosition") - Vector3.new(0, dist/50, 0)).Position
	--[[
	local refinedPosHeight
	if v:isA("BasePart") then
		refinedPosHeight = Vector3.new(0, currentPos.Y + v.Size.Y/2, 0)
	else
		local cframe, size = v:GetBoundingBox()
		refinedPosHeight = Vector3.new(0, currentPos.Y + size.Y/2, 0)
	end

	if refinedPosHeight.Y < CamPos.Y - 200 then
		dist = 1000000
	end
	]]
		if not isPositionOnScreen(v:GetAttribute("OriginalPosition") - Vector3.new(0, dist/50, 0)) then
			dist = 100000000

			v:PivotTo(CFrame.new(v:GetAttribute("OriginalPosition") - Vector3.new(0, dist/50, 0)) * v:GetPivot().Rotation)
		elseif isPositionOnScreen(v:GetAttribute("OriginalPosition") - Vector3.new(0, dist/50, 0)) then
			v:PivotTo(CFrame.new(v:GetAttribute("OriginalPosition") - Vector3.new(0, dist/50, 0)) * v:GetPivot().Rotation)
		end


	end
end)
-- Public Constructors



function DropdownClass.new(button, listFrame)
	local self = setmetatable({}, DropdownClass)
	
	self._Maid = Lazy.Utilities.Maid.new()
	self._ChangedBind = Instance.new("BindableEvent")
	self._Options = {}
	self._Selected = nil
	
	self.Button = button
	self.ListFrame = listFrame
	self.Changed = self._ChangedBind.Event
	
	init(self)
	self:Set(self._Options[1])
	
	return self
end

function DropdownClass.Create(list, max)
	max = max or #list
	
	local button = DROP_BUTTON:Clone()
	local listFrame = Lazy.Constructors.List.Create(list, max)
	
	listFrame.Position = UDim2.new(0, 0, 1, 0)
	listFrame.Size = UDim2.new(1, 0, max, 0)
	listFrame.Visible = false
	listFrame.Parent = button
	
	return DropdownClass.new(button, listFrame)
end
--[=[
	The value of the ValueObject
	@prop Value T
	@within ValueObject
]=]


function ValueObject:__index(index)
	if index == "Value" then
		return self._value
	elseif ValueObject[index] then
		return ValueObject[index]
	elseif index == "_value" then
		return nil -- Edge case
	else
		error(("%q is not a member of ValueObject"):format(tostring(index)))
	end
end

function ValueObject:__newindex(index, value)
	if index == "Value" then
		local previous = rawget(self, "_value")
		if previous ~= value then
			rawset(self, "_value", value)

			local maid = Maid.new()

			self.Changed:Fire(value, previous, maid)

			self._maid._valueMaid = maid
		end
	else
		error(("%q is not a member of ValueObject"):format(tostring(index)))
	end
end
-- << MESSAGING SERVICE >>


spawn(function()
	--testSub:Disconnect()
	for _, topicName in pairs(topics) do
		main.messagingService:SubscribeAsync(topicName, function(message)
			local data = message.Data
			
			if topicName == "BeginPoll" then
				local newData, scores = main:GetModule("cf"):BeginPoll(data)
				main.messagingService:PublishAsync(data.UniquePollTopic, scores)
				
			elseif topicName == "DisplayPollResultsToServer" then
				for i, plr in pairs(main.players:GetChildren()) do
					main:GetModule("cf"):DisplayPollResults(plr, data)
				end	
			
			elseif topicName == "GetAmountOfServers" then
				local topicName = data
				main.messagingService:PublishAsync(topicName)
			
			elseif topicName == "GlobalAlert" then
				for i,plr in pairs(main.players:GetChildren()) do
					main.signals.CreateAlert:FireClient(plr, {data.Title, data.Message})
				end
			
			elseif topicName == "GlobalCommands" then
				local data = message.Data
				-------------------------------------------
				if data.Name == "globalPlace" then
					local placeId = data.PlaceId
					local placeName = data.PlaceName
					for i, plr in pairs(main.players:GetChildren()) do
						local notice = {
							"Global Teleport",
							"Click to teleport to "..placeName.." ["..placeId.."]",
							{"Teleport", placeId},
						}
						main.signals.Notice:FireClient(plr, notice)
					end
				end
				
				
				-------------------------------------------
				if data.Name == "globalForcePlace" then
					local placeId = data.PlaceId
					local placeName = data.PlaceName
					for i, plr in pairs(main.players:GetChildren()) do
						main.teleportService:Teleport(placeId, plr)
					end
				end
				
				
				-------------------------------------------
			end--]]
		end)
	end
end)



return module
-- Connection class



local Connection = {}
Connection.__index = Connection

function Connection.new(signal, fn)
	return setmetatable({
		_connected = true,
		_signal = signal,
		_fn = fn,
		_next = false,
	}, Connection)
end

function Connection:Disconnect()
	assert(self._connected, "Connection already disconnected.")
	self._connected = false

	if self._signal._handlerListHead == self then
		self._signal._handlerListHead = self._next
	else
		local prev = self._signal._handlerListHead
		while prev and prev._next ~= self do
			prev = prev._next
		end
		if prev then
			prev._next = self._next
		end
	end
end
-- EVENTS --


local ResizeEvent = ParentContainer.Attribs.ResizeEvent

local RowCt = 5
local CellSize = 0.25
local Padding = 10
local ContainerPadding_Bottom = 32

function getNewCellSize()
	 CellSize = (Container.AbsoluteSize.X / RowCt) - Padding
end

function updateLayout()
	--[[
	if #Container.Cells:GetChildren() < 1 then
		Container.Parent.HeaderFrame.Visible = false
	else
		Container.Parent.HeaderFrame.Visible = true
	end
	]]
	getNewCellSize()

	local cells = Container.Cells:GetChildren()
	
	for i, cell in pairs(cells) do
		local index = i - 1
		local posX = ((index % RowCt) * (CellSize + Padding)) + (Padding / 2)
		local posY = (math.floor(index / RowCt) * (CellSize + Padding)) + (Padding / 2)

		cell.Size = UDim2.fromOffset(CellSize, CellSize)
		cell.Position = UDim2.fromOffset(posX, posY)
	end

	local rows = math.ceil((#cells / RowCt))

	local newSize = UDim2.new(1, -24, 0, (rows * CellSize + Padding) + ContainerPadding_Bottom)
	Container.Size = newSize

	ResizeEvent:Fire(ParentContainer.Name)
end


Container.Cells.ChildAdded:Connect(updateLayout)
Container.Cells.ChildRemoved:Connect(updateLayout)
Container:GetPropertyChangedSignal("AbsoluteSize"):Connect(updateLayout)
--//Handling//--


local SteeringAngle = 40 --{Steering angle in degrees}
local SteerSpeed = 0.05 --{.01 being slow, 1 being almost instantly}
local TiresFront = 2 --{1 = eco, 2 = road, 3 = sport}
local TiresRear = 2 --{1 = eco, 2 = road, 3 = sport}
local DownforceF = 0 --{[0-5] Provides downforce to the front at the cost of drag}
local DownforceR = 0 --{[0-5] Provides downforce to the rear at the cost of drag}
local BrakeBias = 72 --{100 = all on front || 0 = all on rear}
local BrakePower = 80  --{100 = strong brakes 0 = close to no brakes}
local TC = false
local ABS = true
--[=[
	@within TableUtil
	@function Reduce
	@param tbl table
	@param predicate (accumulator: any, value: any, index: any, tbl: table) -> result: any
	@return table

	Performs a reduce operation against the given table, which can be used to
	reduce the table into a single value. This could be used to sum up a table
	or transform all the values into a compound value of any kind.

	For example:

	```lua
	local t = {10, 20, 30, 40}
	local result = TableUtil.Reduce(t, function(accum, value)
		return accum + value
	end)
	print(result) --> 100
	```
]=]


local function Reduce(t: Table, f: ReducePredicate, init: any?): any
	assert(type(t) == "table", "First argument must be a table")
	assert(type(f) == "function", "Second argument must be a function")
	local result = init
	if #t > 0 then
		local start = 1
		if init == nil then
			result = t[1]
			start = 2
		end
		for i = start,#t do
			result = f(result, t[i], i, t)
		end
	else
		local start = nil
		if init == nil then
			result = next(t)
			start = result
		end
		for k,v in next,t,start do
			result = f(result, v, k, t)
		end
	end
	return result
end
--// Handling Settings		


	Firerate = 60 / 875; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--[[
	Function called when the client is notified of a player state update.
]]


function UIController.onClientStateUpdated(currentState, currentTick)
	if currentState == "pregame" then
		UIController.setView("mainMenu")
	elseif currentState == "warmup" then
		UIController.setView("warmup")
	elseif currentState == "game" then
		UIController.setView("game", currentTick)
	elseif currentState == "spectating" then
		UIController.setView("spectating")
	elseif currentState == "finished" then
		UIController.setView("finished")
	elseif currentState == "dead" then
		UIController.setView("dead")
	elseif currentState == "postgame" then
		UIController.setView("postGame")
	end
end