From 06be8925e8941591d89b768641c38c068b07a66b Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 18 Jan 2026 18:23:20 +0000 Subject: [PATCH] Sigma --- assets/css/custom.css | 12 ++++++++ assets/js/main.js | 64 +++++++++++++++++++++++++++++++++++++++---- index.php | 63 ++++++++++++++++++++++++------------------ run.php | 15 ++++++++++ 4 files changed, 122 insertions(+), 32 deletions(-) create mode 100755 run.php diff --git a/assets/css/custom.css b/assets/css/custom.css index 7d56c59..1a2685f 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -37,3 +37,15 @@ body { background-color: #007acc; border-color: #007acc; } + +@media (max-width: 991.98px) { + .split-container { + flex-direction: column; + height: auto; + } + + .editor-container, .output-container { + height: 50vh; /* Adjust as needed */ + margin-bottom: 1rem; + } +} diff --git a/assets/js/main.js b/assets/js/main.js index 1286376..b4fd277 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -8,6 +8,8 @@ document.addEventListener('DOMContentLoaded', () => { const saveBtn = document.getElementById('save-btn'); const loadBtn = document.getElementById('load-btn'); const clearOutputBtn = document.getElementById('clear-output-btn'); + const runBtn = document.getElementById('run-btn'); + const runOutput = document.getElementById('run-output'); const obfuscatedOutput = document.getElementById('obfuscated-output'); const loader = document.getElementById('loader'); const versionSpan = document.getElementById('luau-version'); @@ -248,12 +250,62 @@ document.addEventListener('DOMContentLoaded', () => { }); // --- Split View --- - Split(['#split-0', '#split-1'], { - sizes: [50, 50], - minSize: 200, - gutterSize: 8, - onDrag: function() { - editor.resize(); + let split; + + function setupSplit() { + if (window.innerWidth < 992) { + if (split) { + split.destroy(); + split = null; + } + } else { + if (!split) { + split = Split(['#split-0', '#split-1'], { + sizes: [50, 50], + minSize: 200, + gutterSize: 8, + onDrag: function() { + editor.resize(); + } + }); + } + } + } + + window.addEventListener('resize', setupSplit); + setupSplit(); // Initial call + + runBtn.addEventListener('click', async () => { + const code = editor.getValue(); + runOutput.textContent = ''; + loader.style.display = 'block'; + runBtn.disabled = true; + + // Give the UI a moment to update + await new Promise(resolve => setTimeout(resolve, 50)); + + try { + const formData = new FormData(); + formData.append('code', code); + + const response = await fetch('run.php', { + method: 'POST', + body: formData + }); + + if (response.ok) { + const result = await response.text(); + runOutput.textContent = result; + } else { + runOutput.textContent = `Error: ${response.statusText}`; + } + + } catch (err) { + runOutput.textContent = `Error: ${err.message}`; + console.error(err); + } finally { + loader.style.display = 'none'; + runBtn.disabled = false; } }); }); diff --git a/index.php b/index.php index 6615209..26911a7 100644 --- a/index.php +++ b/index.php @@ -37,37 +37,46 @@
Luau Obfuscator
- Loading Luau... - - + Loading Luau...
+
- -
- - -
- - - - - - - -
+
@@ -82,6 +91,8 @@ print("Current time: " .. os.date()) Loading...

+                
Run Output
+

             
         
     
diff --git a/run.php b/run.php
new file mode 100755
index 0000000..917045e
--- /dev/null
+++ b/run.php
@@ -0,0 +1,15 @@
+&1");
+    unlink($file);
+
+    echo $output;
+} else {
+    echo "No code provided.";
+}
+?>
\ No newline at end of file