Skip to content

Commit 0b2ddc9

Browse files
authored
Update script.js
1 parent 4113046 commit 0b2ddc9

1 file changed

Lines changed: 35 additions & 39 deletions

File tree

script.js

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,77 +8,73 @@ const goBtn = document.getElementById('go');
88
const dlBtn = document.getElementById('dl');
99
const clearBtn = document.getElementById('clear');
1010

11-
const gen = (t, l) => {
12-
let c = t === 'upper' ? "ABCDEFGHIJKLMNOPQRSTUVWXYZ" : "lIlIIllllIIl";
13-
return Array.from({length: l}, () => c[Math.floor(Math.random() * c.length)]).join('');
14-
};
15-
16-
const phases = [
17-
"analyzing source environment...",
18-
"fetching premium tamper assets...",
19-
"virtualizing constant stack...",
20-
"sealing polymorphic bytecode...",
21-
"v1.12.01-1 protection complete."
22-
];
11+
const sleep = (ms) => new Promise(res => setTimeout(res, ms));
2312

24-
const updateLog = async (text) => {
25-
const entries = log.querySelectorAll('.status-entry');
26-
entries.forEach(e => e.classList.add('dim'));
27-
if (entries.length > 2) entries[0].remove();
28-
const div = document.createElement('div');
29-
div.className = 'status-entry';
30-
div.innerText = text;
31-
log.appendChild(div);
13+
const updateLog = (text) => {
14+
log.innerHTML = `<div class="status-entry">${text}</div>`;
3215
};
3316

3417
clearBtn.onclick = () => {
35-
i.value = ''; o.value = ''; dlBtn.disabled = true;
18+
i.value = ''; o.value = '';
19+
dlBtn.disabled = true;
20+
dlBtn.style.opacity = "0.5";
3621
};
3722

3823
dlBtn.onclick = () => {
3924
const blob = new Blob([o.value], {type: 'text/plain'});
4025
const a = document.createElement('a');
4126
a.href = URL.createObjectURL(blob);
42-
a.download = "protected_v1_12_01_1.lua";
27+
a.download = "protected_build.lua";
4328
a.click();
4429
};
4530

4631
goBtn.onclick = async () => {
4732
const source = i.value.trim();
4833
if (!source) return;
4934

35+
// UI Reset
5036
loader.style.display = 'flex';
51-
log.innerHTML = '';
52-
lbar.style.width = '0%';
5337
ghSpinner.classList.add('spinning');
38+
lbar.style.width = '0%';
39+
40+
const phases = [
41+
"initializing v1.12.01-1...",
42+
"fetching robux assets...",
43+
"building xor stack...",
44+
"sealing polymorphic vm..."
45+
];
5446

47+
// Execution with forced UI painting
5548
for (let idx = 0; idx < phases.length; idx++) {
56-
await updateLog(phases[idx]);
49+
updateLog(phases[idx]);
5750
lbar.style.width = `${((idx + 1) / phases.length) * 100}%`;
58-
await new Promise(r => setTimeout(r, 600 + Math.random() * 400));
51+
await sleep(900); // Give enough time for the spin to be seen
5952
}
6053

61-
// Protection Logic
54+
// Heavy Processing (Small delay so "Sealing" text shows first)
55+
await sleep(100);
56+
6257
const key = Math.floor(Math.random() * 200) + 50;
6358
const bytes = source.split('').map(c => c.charCodeAt(0) ^ key);
59+
60+
// Robux:  (\238\128\139) | Premium:  (\238\128\129)
6461
const ROBUX = "\\238\\128\\139";
6562
const PREM = "\\238\\128\\129";
66-
67-
const V_VM = gen('upper', 24);
68-
const V_DATA = gen('', 32);
69-
const V_CRASH = gen('upper', 16);
63+
const V_VM = "VM_" + Math.random().toString(36).substring(7).toUpperCase();
7064

7165
let payload = `--[[ protected by pobfus v1.12.01-1 ]]\n`;
72-
payload += `local function ${V_CRASH}() while true do warn("${ROBUX} TAMPER ${PREM}") end end `;
73-
payload += `if (debug and debug.getinfo) or (_G.shared) then ${V_CRASH}() end `;
74-
payload += `local d = {${bytes.join(',')}} local k = ${key} `;
75-
payload += `local function ${V_VM}() local s = "" `;
76-
payload += `for i=1, #d do s = s .. string.char(bit32.bxor(d[i], k)) end `;
77-
payload += `local f = loadstring(s) if f then setfenv(f, getfenv()) f() end end `;
78-
payload += `${V_VM}()`;
66+
payload += `local function crash() while true do warn("${ROBUX} TAMPER DETECTED ${PREM}") end end\n`;
67+
payload += `if (debug and debug.getinfo) or _G.shared then crash() end\n`;
68+
payload += `local d={${bytes.join(',')}} local k=${key}\n`;
69+
payload += `local function ${V_VM}() local s="" for i=1,#d do s=s..string.char(bit32.bxor(d[i],k)) end\n`;
70+
payload += `local f=loadstring(s) if f then setfenv(f,getfenv()) f() end end ${V_VM}()`;
7971

8072
o.value = payload;
73+
74+
// Finalize UI
8175
dlBtn.disabled = false;
76+
dlBtn.style.opacity = "1";
8277
ghSpinner.classList.remove('spinning');
83-
setTimeout(() => { loader.style.display = 'none'; }, 500);
78+
await sleep(400);
79+
loader.style.display = 'none';
8480
};

0 commit comments

Comments
 (0)