input: Write a python function to scrape NBA scores from a given URL and save them into a text file.
  assert scrape_nba_scores("https://www.nba.com/scores", "scores.txt") == True
  assert os.path.exists("scores.txt") == True
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_nba_scores(url, output_file):
      try:
          response = requests.get(url)
          response.raise_for_status()  # Ensure we notice bad responses
  
          soup = BeautifulSoup(response.text, 'html.parser')
          scores = soup.find_all(class_='score-class')  # Assuming 'score-class' is the class used for scores
  
          with open(output_file, 'w') as file:
              for score in scores:
                  file.write(score.get_text() + '\n')
  
          return True
      except Exception as e:
          print(f"An error occurred: {e}")
          return False