private IEnumerator ScoreSystem() { Debug.Log("Starting score system!"); while (true) { yield return(new WaitForSeconds(scoreCooldown)); score += scoreIncrease; if (speed < maxSpeed && !powerupManager.GetIsSpeed()) { Debug.Log("Increasing speed!"); speed *= speedIncrease; } Debug.Log("Increasing score!"); scoreCooldown -= scoreDecrease; } }