-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================

local function BoostSetup()	
	local Speedometer = gui:WaitForChild("Speedometer")
	local Bar = Speedometer:WaitForChild("Bar")
	local SpeedBar = Bar:WaitForChild("SpeedBar")

	function GuiController:UpdateBoost(boostAmount)
		local boostPercentage = math.clamp(boostAmount/engine._settings.BoostAmount, 0, 1)
		Bar.Position = UDim2.new(-1 + boostPercentage, 0, 0, 0)
		SpeedBar.Position = UDim2.new(1 - 1*boostPercentage, 0, 0, 0)
	end
end -- BoostSetup()