function plagiarism_checker_form_shortcode() {
    ob_start();
    ?>
    <form id="plagiarism-checker-form" method="post">
        <textarea name="text" rows="5" placeholder="Enter your text here"></textarea>
        <button type="submit">Check Plagiarism</button>
    </form>
    <div id="plagiarism-checker-result"></div>
    <script>
    (function($) {
        $('#plagiarism-checker-form').on('submit', function(e) {
            e.preventDefault();
            var form = $(this);
            var resultDiv = $('#plagiarism-checker-result');
            resultDiv.empty().html('Checking...');
            $.ajax({
                url: '<?php echo admin_url('admin-ajax.php'); ?>',
                type: 'POST',
                dataType: 'json',
                data: form.serialize() + '&action=plagiarism_checker',
                success: function(response) {
                    var resultText = response.contains_prohibited_words ? 'Contains prohibited words.' : 'Does not contain prohibited words.';
                    resultDiv.html(resultText);
                },
                error: function() {
                    resultDiv.html('Error occurred while checking plagiarism.');
                }
            });
        });
    })(jQuery);
    </script>
    <?php
    return ob_get_clean();
}
add_shortcode('plagiarism_checker_form', 'plagiarism_checker_form_shortcode');