05/04/2025
AI Script Writing Tool: Easily write script by using this tool, and earn passive income.........
AI Script Writing Tool: Easily write script by using this tool, and earn passive income
1
Script Writing Tool
.regenerateIcon {
cursor: pointer;
display: inline-block;
margin-left: 10px;
font-size: 20px;
/* Adjust size as needed */
}
body {
font-family: 'Arial', sans-serif;
background-color: ;
margin: 0;
padding: 20px;
box-sizing: border-box;
}
{
background-color: ;
border-radius: 8px;
overflow: hidden;
width: 100%;
max-width: 800px;
margin: auto;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
{
width: 100%;
padding: 10px;
margin-bottom: 20px;
border-radius: 8px;
border: none;
color: white;
text-align: center;
font-size: 16px;
cursor: pointer;
background-image: linear-gradient(to right, 0%, 100%);
transition: all 0.3s ease;
text-decoration: none;
/* Remove underline from download link */
display: inline-block;
/* Needed for anchor to behave like a button */
text-align: center;
/* Ensure text is centered in download link */
}
{
padding: 20px;
max-height: 300px;
overflow-y: auto;
}
.messageContainer {
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
}
.message {
background-color: ;
padding: 10px;
border-radius: 5px;
max-width: 70%;
word-wrap: break-word;
}
{
width: calc(100% - 40px - 10px);
margin: 10px 20px;
padding: 12px;
border-radius: 5px;
border: 1px solid ;
}
button {
width: 100%;
padding: 10px;
margin-bottom: 20px;
border-radius: 8px;
border: none;
color: white;
text-align: center;
font-size: 15px;
cursor: pointer;
background-image: linear-gradient(to right, 0%, 100%);
transition: all 0.3s ease;
text-decoration: none;
/* Remove underline from download link */
display: inline-block;
/* Needed for anchor to behave like a button */
text-align: center;
/* Ensure text is centered in download link */
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
{
background-color: ;
}
{
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
}
> div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 20px;
}
/* Add styles for formatted text */
.formatted-text {
white-space: pre-wrap;
/* Keeps white space and line breaks */
}
.formatted-text a {
color: ;
text-decoration: none;
}
.formatted-text a:hover {
text-decoration: underline;
}
/* Dropdown Styles */
,
{
width: calc(50% - 25px);
/* Adjust width to fit side by side with some space */
padding: 10px;
margin: 10px;
border-radius: 5px;
border: 1px solid ;
background-color: ;
font-family: 'Arial', sans-serif;
font-size: 16px;
box-sizing: border-box;
/* Ensure padding and border are included in width */
display: inline-block;
/* Display side by side */
cursor: pointer;
}
:disabled,
:disabled {
background-color: ;
cursor: not-allowed;
}
/* Adjust margin for the prompt to align with the new dropdowns */
{
margin: 0 10px 10px 10px;
}
/* Style adjustments for button to align with the new layout */
button {
width: calc(100% - 20px);
margin: 10px;
}
/* Ensure the container width accommodates new elements */
{
padding-bottom: 10px;
/* Add some padding at the bottom */
}
.message.code {
background-color: ;
/* Light grey background */
color: #333;
/* Darker text for contrast */
font-family: monospace;
/* Monospace font for code-like appearance */
white-space: pre-wrap;
/* Allows text to wrap and preserves formatting */
word-wrap: break-word;
/* Allows long lines to break and wrap to the next line */
padding: 10px;
/* Padding inside the preformatted text block */
border-radius: 5px;
/* Rounded corners like other messages */
}
Script Writing Tool
Category
YouTube
Podcast
Film
TV Show
Commercial
Documentary
Theater
Animation
Video Game
Educational
Tutorial
Webinar
Vlog
Product Review
Explainer Video
Default (English)
Assamese
Bengali
Gujarati
Hindi
Kannada
Kashmiri
Konkani
Malayalam
Marathi
Nepali
Odia
Punjabi
Sanskrit
Sindhi
Tamil
Telugu
Urdu
Generate Script
Thinking...
function generate() {
var prompt = $(" ").val();
var category = $(" ").val();
var language = $(" ").val(); // Get the value of the selected option
var scriptPrompt = `Write a script for ${category} category with "${prompt}" in ${language} language`;
$(' ').show(); // Show progress overlay
// how to get API key
// https://allfreestore.com/wp-content/uploads/2024/03/Get%20OpenAI%20API%20Key.mp4
var apiKey = 'your_api_key'; // Replace with your actual OpenAI API key
var apiUrl = 'https://api.openai.com/v1/chat/completions';
var requestBody = {
model: 'gpt-3.5-turbo',
messages: [{
role: 'user',
content: scriptPrompt
}],
temperature: 0.7
};
$.ajax({
type: 'POST',
url: apiUrl,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + apiKey
},
data: JSON.stringify(requestBody),
success: function(response) {
$(' ').hide(); // Hide progress overlay
addTypewriterEffect(response.choices[0].message.content, 'chatBody');
},
error: function(error) {
$(' ').hide(); // Hide progress overlay on error
console.error('Error generating privacy policy:', error);
}
});
}
function formatResponseText(text) {
// Convert URLs into hyperlinks
text = text.replace(/(https?:\/\/[^\s]+)/g, '$1');
// Detect headings and make them bold
text = text.replace(/^ # #\s?(.+)/gm, '$1');
// Replace newline characters with tags for paragraphs
// text = text.replace(/\n/g, '');
// Wrap the text in tags to ensure it starts and ends as a paragraph
return '' + text + '';
}
function addTypewriterEffect(text, elementId) {
var formattedText = formatResponseText(text);
var container = $('').appendTo(' #' + elementId);
var message = $('').appendTo(container);
var i = 0;
var speed = 10; // Typing speed in milliseconds
function typeWriter() {
if (i < formattedText.length) {
var charToAdd = formattedText.charAt(i);
if (formattedText.substring(i).startsWith('', i) + 1;
charToAdd = formattedText.substring(i, tagEnd);
i = tagEnd;
} else if (formattedText.charAt(i) === '', i) + 1;
charToAdd = formattedText.substring(i, tagEnd);
i = tagEnd - 1;
}
message.append(charToAdd);
i++;
setTimeout(typeWriter, speed);
} else {
var copyIcon = $('📋').appendTo(container);
copyIcon.click(function() {
var textToCopy = message.text();
navigator.clipboard.writeText(textToCopy).then(function() {
alert('Text copied to clipboard!');
}, function(err) {
console.error('Could not copy text: ', err);
});
});
var regenerateIcon = $('& ;').appendTo(container);
regenerateIcon.click(function() {
$(' ').html(''); // Clear the previous messages
generate(); // Call generatePrivacyPolicy function to regenerate the policy
});
}
}
typeWriter();
}
function formatResponseText(text) {
text = text.replace(/(https?:\/\/[^\s]+)/g, '$1');
text = text.replace(/^ # #\s?(.+)/gm, '$1');
text = text.replace(/^(\s*(?:-|\*|\d+\.)\s+.+)$/gm, '$1');
return text;
}
.regenerateIcon,
.copyIcon {
cursor: pointer;
display: inline-block;
margin-left: 10px;
font-size: 20px;
/* Adjust size as needed */
}
.userMessage .message {
background-color: ;
}
{
display: none;
/* Initially hidden */
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
}
> div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 20px;
}
Thinking...