-- 1 refers to the cart ID in situations where there is more than one cart

local cart = Cart.new(game.Workspace.Cart, 1)

GameStartEvent.Event:Connect(function()
	cart:start()
	while wait(0.15) and isGameActive.Value do
		cart:onUpdate()
	end
end)

GameOverEvent.Event:Connect(function()
	cart:stop()
end)
