input: Write a function to generate a script in Python that competes in a Kaggle competition. The script should load necessary libraries, read data, split it into training and testing sets, define a model, fit it to the data, make predictions on the test set, score the prediction, and submit the prediction to Kaggle. If the model is successfully trained and predictions submitted, return True, else return False.
  assert kaggle_competition_script()==True
  assert kaggle_competition_script()==False
output: 
  def kaggle_competition_script():
      try:
          import pandas as pd
          from sklearn.model_selection import train_test_split
          from sklearn.ensemble import RandomForestClassifier
          from sklearn.metrics import accuracy_score
  
          # Load data
          data = pd.read_csv('data.csv')
          X = data.drop('target', axis=1)
          y = data['target']
  
          # Split data
          X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
          # Define model
          model = RandomForestClassifier()
  
          # Fit model
          model.fit(X_train, y_train)
  
          # Make predictions
          y_pred = model.predict(X_test)
  
          # Score prediction
          score = accuracy_score(y_test, y_pred)
  
          # Submit prediction (simulated)
          submission = pd.DataFrame({'Id': X_test.index, 'Predicted': y_pred})
          submission.to_csv('submission.csv', index=False)
  
          return True
      except Exception as e:
          return False
  