diff --git a/.DS_Store b/.DS_Store
index f411f47..547d2fb 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..20d313c
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "aiscreenplay"]
+ path = aiscreenplay
+ url = https://github.com/ruvnet/aiscreenplay.git
diff --git a/AISCREENPLAY_SETUP.md b/AISCREENPLAY_SETUP.md
new file mode 100644
index 0000000..2fb08fc
--- /dev/null
+++ b/AISCREENPLAY_SETUP.md
@@ -0,0 +1,65 @@
+# AI Screenplay Generator Setup Guide
+
+The aiscreenplay submodule has been configured and improved for easy use.
+
+## Quick Start
+
+1. **Navigate to the aiscreenplay directory:**
+ ```bash
+ cd aiscreenplay
+ ```
+
+2. **Install dependencies:**
+ ```bash
+ pip install -r requirements.txt
+ ```
+
+3. **Set your OpenAI API key:**
+ ```bash
+ export OPENAI_API_KEY='your-api-key-here'
+ ```
+
+ Get your API key from: https://platform.openai.com/api-keys
+
+4. **Run the app:**
+ ```bash
+ ./run.sh
+ ```
+
+ The app will open at http://localhost:8501
+
+## Improvements Made
+
+- ✅ Updated to use environment variables for API key (more secure)
+- ✅ Modernized to use OpenAI ChatCompletion API (gpt-3.5-turbo)
+- ✅ Added error handling and user-friendly messages
+- ✅ Created requirements.txt for easy dependency management
+- ✅ Added run.sh script for simplified startup
+- ✅ Improved README with clearer instructions
+
+## How to Use
+
+Once the app is running:
+
+1. Fill out the scene template with your screenplay details:
+ - Location (e.g., "Coffee shop - interior")
+ - Time of day (e.g., "Morning")
+ - Characters (e.g., "JOHN, 30s, detective")
+ - Objective (what should happen)
+ - Conflict (obstacles characters face)
+ - Key dialogue
+ - Important actions
+ - Emotional tone
+ - Additional notes
+
+2. Adjust optional parameters:
+ - **Temperature**: Controls creativity (0.0-1.0, default 0.7)
+ - **P-Value**: Controls diversity (0.0-1.0, default 0.9)
+
+3. Click "Generate Screenplay"
+
+4. Copy the generated screenplay to your preferred screenwriting software
+
+## Note
+
+The improvements are stored locally in the submodule. If you want to keep them permanently, consider forking the original repository to your own GitHub account.
diff --git a/README.md b/README.md
index 7676ade..6606b1f 100644
--- a/README.md
+++ b/README.md
@@ -9,17 +9,20 @@

-## Project Structure
-- *imsdb_scraper* contains the scrapy spider built to crawl IMSDB.com and download the film script data that is used to train our text generation model.
+## Project Structure
+- *imsdb_scraper* contains the scrapy spider built to crawl IMSDB.com and download the film script data that is used to train our text generation model.
- - To run the scraper change directory to imsdb_scraper with `cd imsdb_scraper`. As I haven't built any pipelines currently to run the scraper and save it's output simply run `scrapy crawl scriptSpider -o scripts.json -t json` and for now manually move this output file to `script_buddy/data/` and you'll be good to go.
+ - To run the scraper change directory to imsdb_scraper with `cd imsdb_scraper`. As I haven't built any pipelines currently to run the scraper and save it's output simply run `scrapy crawl scriptSpider -o scripts.json -t json` and for now manually move this output file to `script_buddy/data/` and you'll be good to go.
-- *script_buddy* contains the model fine tuning notebook, utility script parsing functions, tweepy bot code, and streamlit application code.
- - If you'd like to run the streamlit app locally
- - `git clone https://github.com/cdpierse/script_buddy_v2.git`
+- *script_buddy* contains the model fine tuning notebook, utility script parsing functions, tweepy bot code, and streamlit application code.
+ - If you'd like to run the streamlit app locally
+ - `git clone https://github.com/cdpierse/script_buddy_v2.git`
- `pip install -r requirements.txt`
- `cd script_buddy`
- `streamlit run app.py`
- - This should open an instance of the app for you to experiment with. Running it for the first time may take a
- while as the model needs to be downloaded from huggingface's model hub.
+ - This should open an instance of the app for you to experiment with. Running it for the first time may take a
+ while as the model needs to be downloaded from huggingface's model hub.
+
+- *aiscreenplay* contains an AI screenplay generator that creates formatted screenplays based on scene templates using OpenAI's API.
+ - See [AISCREENPLAY_SETUP.md](AISCREENPLAY_SETUP.md) for setup and usage instructions
diff --git a/ScreenplayWriter.html b/ScreenplayWriter.html
new file mode 100644
index 0000000..d0f6ff6
--- /dev/null
+++ b/ScreenplayWriter.html
@@ -0,0 +1,821 @@
+
+
+
Create your first screenplay project to get started
+
+
+
+
+
+
+
Create New Project
+
+
+
+
+
+
+
+
+
+
+
diff --git a/screenplay_app/README.md b/screenplay_app/README.md
new file mode 100644
index 0000000..72c017d
--- /dev/null
+++ b/screenplay_app/README.md
@@ -0,0 +1,151 @@
+# Screenplay Writer App
+
+A professional screenplay writing application with Google authentication and project management.
+
+## Features
+
+- ✨ **AI-Powered Writing**: Continue your screenplay with AI assistance (OpenAI GPT-3.5)
+- 💾 **Auto-Save**: Projects automatically save as you type
+- 🎨 **Light/Dark Mode**: Toggle between light and dark themes
+- 📱 **Responsive Design**: Works on all devices
+- 🎬 **Professional Formatting**: Industry-standard screenplay formatting
+- 👥 **Character Tracking**: Automatically tracks characters and scenes
+- ⌨️ **Smart Type Menu**: Press Enter to choose element type (like Final Draft)
+- 🔐 **Google Sign-In**: Secure authentication with Google account
+
+## Getting Started
+
+### Quick Start
+
+1. Open `index.html` in your web browser
+2. Click "Continue without signing in (demo mode)" for instant access
+3. Or sign in with your Google account for full functionality
+
+### File Structure
+
+- `index.html` - Sign-in page with Google OAuth
+- `projects.html` - Projects dashboard showing all your screenplays
+- `editor.html` - The screenplay editor with all writing tools
+
+## How to Use
+
+### Creating a Project
+
+1. After signing in, click "New Project" on the projects dashboard
+2. Enter a project name and click "Create"
+3. You'll be taken to the editor automatically
+
+### Writing Your Screenplay
+
+#### Formatting Tools
+
+- **Scene** - Dropdown with INT. (Interior) or EXT. (Exterior) options
+- **Transition** - Dropdown with 13 standard transitions (CUT TO:, FADE IN:, etc.)
+- **Character** - Adds character name with proper indentation
+- **Parenthetical** - Adds parenthetical direction for dialogue
+- **AI Continue** - Generate screenplay content with AI
+- **Save** - Download screenplay as .txt file
+
+#### SmartType Menu
+
+Press **Enter** on a blank line to show the SmartType menu:
+- Scene Heading
+- Action
+- Character
+- Dialogue
+- Parenthetical
+- Transition
+
+Use arrow keys to select, Enter/Tab to apply, Escape to cancel.
+
+#### Auto-Indent
+
+After typing a character name in ALL CAPS, pressing Enter will automatically indent for dialogue.
+
+#### Keyboard Shortcuts
+
+- **Cmd/Ctrl + S** - Save screenplay as .txt file
+
+### Project Management
+
+- **Open** - Open a project to continue writing
+- **Duplicate** - Create a copy of a project
+- **Delete** - Remove a project (with confirmation)
+
+Projects show:
+- Creation date
+- Last modified date
+- Word count
+
+### AI Continue Feature
+
+1. Click "✨ AI Continue" button
+2. Enter a prompt for what should happen next
+3. AI will generate screenplay content in proper format
+
+**Note**: You'll need an OpenAI API key for AI features. Get one at https://platform.openai.com/api-keys
+
+## Google Sign-In Setup
+
+To enable Google Sign-In:
+
+1. Go to [Google Cloud Console](https://console.cloud.google.com/)
+2. Create a new project or select existing one
+3. Enable Google Identity Services API
+4. Create OAuth 2.0 credentials
+5. Add authorized JavaScript origins (your domain)
+6. Copy the Client ID
+7. In `index.html`, replace `YOUR_GOOGLE_CLIENT_ID` with your actual Client ID (line 164)
+
+## Technology Stack
+
+- **Frontend**: HTML, CSS, JavaScript (Vanilla JS)
+- **Authentication**: Google Identity Services
+- **Storage**: localStorage (client-side)
+- **AI**: OpenAI GPT-3.5 Turbo API
+- **Design**: Custom CSS with light/dark mode support
+
+## Browser Compatibility
+
+Works on all modern browsers:
+- Chrome/Edge (recommended)
+- Firefox
+- Safari
+
+## Data Storage
+
+Projects are stored in browser localStorage:
+- No backend server required
+- Data persists across sessions
+- Stored locally on your device
+- Export your work as .txt files for backup
+
+## Formatting Standards
+
+Based on **The Black List** screenplay formatting:
+- Scene headings: `INT./EXT. LOCATION - DAY/NIGHT`
+- Character names: ALL CAPS, centered (24 spaces indent)
+- Dialogue: 10 spaces indent
+- Parentheticals: 20 spaces indent, in (parentheses)
+- Transitions: Right-aligned (48 spaces)
+- Present tense only
+- No camera directions
+
+## Tips
+
+1. **Save Regularly**: While auto-save is active, use Cmd/Ctrl+S to download backups
+2. **Use Demo Mode**: Try it out without Google sign-in
+3. **Dark Mode**: Toggle with 🌓 button in top right
+4. **SmartType**: Use Enter key for quick formatting
+5. **AI Prompts**: Be specific for better AI-generated content
+
+## Support
+
+For issues or questions, check the sidebar for:
+- **SCENES** - Click to jump to any scene
+- **CHARACTERS** - See all characters in your screenplay
+- **Refresh** - Update the lists manually
+
+## License
+
+Part of the script_buddy_v2 project.
diff --git a/screenplay_app/editor.html b/screenplay_app/editor.html
new file mode 100644
index 0000000..e226393
--- /dev/null
+++ b/screenplay_app/editor.html
@@ -0,0 +1,962 @@
+
+
+
+
+
+ Screenplay Writer
+
+
+
+