Skip to content

Commit e7c2ff7

Browse files
authored
Refactor script.js for improved readability and functionality
1 parent 5efe76f commit e7c2ff7

1 file changed

Lines changed: 95 additions & 87 deletions

File tree

script.js

Lines changed: 95 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,42 @@
11
(function() {
2-
const POBFUS_LOGO = ` _______ __ ___
3-
|_ __ \\ [ | .' ..]
4-
| |__) | .--. | |.--. _| |_ __ _ .--.
5-
| ___// .'\`\\ \\| '/'\`\\ \\'-| |-'[ | | | ( (\`\\]
6-
_| |_ | \\__. || \\__/ | | | | \\_/ |, \`'.'.
7-
|_____| '.__.'[__;.__.' [___] '.__.'_/([__) )
8-
9-
[ Pobfus 1.11.01 | CamBuscate 0.2.1 ]`;
2+
const LOGO_TEXT = ` _______ __ ___ \n|_ __ \\ [ | .' ..] \n | |__) | .--. | |.--. _| |_ __ _ .--. \n | ___// .'\`\\ \\| '/'\`\\ \\'-| |-'[ | | | ( (\`\\] \n _| |_ | \\__. || \\__/ | | | | \\_/ |, \`'.'. \n|_____| '.__.'[__;.__.' [___] '.__.'_/([__) ) \n [ Pobfus 1.11.01 | Suite Test ]`;
3+
4+
// Complex Test Code: Fibonacci, Print, and Junk Aimbot Logic
5+
const TEST_CODE = `-- Pobfus 1.11.01 HEAVY TEST
6+
print("Initializing CamBuscate 0.2.1 Virtualization...")
7+
8+
-- [1] Fibonacci Sequence Test
9+
local function fib(n)
10+
local a, b = 0, 1
11+
for i = 1, n do
12+
a, b = b, a + b
13+
end
14+
return a
15+
end
16+
print("Fibonacci(10): " .. tostring(fib(10)))
17+
18+
-- [2] Junk Aimbot Logic (Visual Complexity Test)
19+
local Settings = { Enabled = true, FOV = 150, Smoothness = 0.5 }
20+
local function GetClosestPlayer()
21+
local target = nil
22+
local dist = Settings.FOV
23+
-- Fake logic to test table indexing
24+
for _, p in pairs(game:GetService("Players"):GetPlayers()) do
25+
if p.Character and p.Character:FindFirstChild("Head") then
26+
target = p.Character.Head
27+
end
28+
end
29+
return target
30+
end
31+
32+
-- [3] Final Yield Test
33+
task.spawn(function()
34+
while task.wait(1) do
35+
print("Obfuscated background thread heart-beat~")
36+
end
37+
end)
38+
39+
warn("Pobfus 1.11.01: Suite Test Injected Successfully!")`;
1040

1141
const ROASTS = [
1242
"your decompiler likes me~ too much...",
@@ -15,100 +45,78 @@
1545
"is that a hook? how aggressive, senpai~"
1646
];
1747

18-
const generateBarcode = (l) => {
48+
const _barcode = (l) => {
1949
let r = "I";
2050
for(let i=0; i<l; i++) r += "Il".charAt(Math.floor(Math.random() * 2));
2151
return r;
2252
};
2353

24-
const generateFileName = () => {
25-
const c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*";
26-
let r = "pobfus-";
27-
for(let i=0; i<25; i++) r += c.charAt(Math.floor(Math.random() * c.length));
28-
return r + ".lua";
29-
};
30-
31-
document.addEventListener('DOMContentLoaded', () => {
32-
document.getElementById('logo').textContent = POBFUS_LOGO;
54+
window.onload = () => {
55+
document.getElementById('logo').textContent = LOGO_TEXT;
56+
const iEl = document.getElementById('in'), oEl = document.getElementById('out'), sEl = document.getElementById('status');
3357

34-
const btnRun = document.getElementById('go');
35-
const btnCopy = document.getElementById('cp');
36-
const btnDown = document.getElementById('dl');
37-
const input = document.getElementById('in');
38-
const output = document.getElementById('out');
39-
const status = document.getElementById('status');
58+
document.getElementById('ts').onclick = () => {
59+
iEl.value = TEST_CODE;
60+
sEl.innerText = "STATUS: HEAVY_SUITE_LOADED";
61+
};
4062

41-
btnRun.onclick = async () => {
42-
if (!input.value.trim()) return;
63+
document.getElementById('go').onclick = function() {
64+
if (!iEl.value.trim()) return;
65+
sEl.innerText = "STATUS: VIRTUALIZING...";
4366

44-
btnRun.disabled = true;
45-
status.innerText = "CAMBUSCATE: VIRTUALIZING_STREAMS...";
46-
47-
await new Promise(r => setTimeout(r, 1000));
48-
49-
try {
50-
const key = Math.floor(Math.random() * 90) + 40;
51-
const bytes = input.value.split('');
52-
let stream = [];
53-
54-
bytes.forEach((char, i) => {
55-
stream.push("0x" + (char.charCodeAt(0) ^ key).toString(16).toUpperCase());
56-
// The "Screaming Middle" Roast Injection
57-
if (i % 8 === 0) {
58-
const roast = ROASTS[Math.floor(Math.random() * ROASTS.length)];
59-
stream.push(`"${roast}_${Math.random().toString(36).substring(7)}"`);
67+
setTimeout(() => {
68+
try {
69+
const key = Math.floor(Math.random() * 80) + 40;
70+
const raw = iEl.value;
71+
let stream = [];
72+
73+
for (let i = 0; i < raw.length; i++) {
74+
stream.push("0x" + (raw.charCodeAt(i) ^ key).toString(16).toUpperCase());
75+
// MOONSEC STYLE: Inject Roasts as table-slop
76+
if (i % 5 === 0) {
77+
const r = ROASTS[Math.floor(Math.random() * ROASTS.length)];
78+
stream.push(`"${r}_${_barcode(3)}"`);
79+
}
6080
}
61-
});
62-
63-
const v = {
64-
env: generateBarcode(12),
65-
out: generateBarcode(10),
66-
tab: generateBarcode(14),
67-
vm: generateBarcode(16)
68-
};
69-
70-
// The MoonSec-Style Minified Brick Construction
71-
let lua = `--[[${POBFUS_LOGO}\n [!] POBFUS_V1.11.01\n [!] ENGINE: CAMBUSCATE_0.2.1]]\n`;
72-
73-
// Anti-Decompiler Performance Slop
74-
for(let i=1; i<=3; i++) {
75-
lua += `local P_${i}="";for i=1,350 do P_${i}=P_${i}.."${Math.random().toString(36).substring(7)}" end;`;
76-
}
7781

78-
// Core Logic
79-
lua += `local ${v.env}=(getfenv(0) or _G);local ${v.out}="";local ${v.tab}={${stream.join(',')}};`;
80-
lua += `local function ${v.vm}(d,k)for _,v in pairs(d)do if type(v)=="\110\117\109\98\101\114"then `;
81-
lua += `${v.out}=${v.out}..${v.env}["\115\116\114\105\110\103"]["\99\104\97\114"](${v.env}["\98\105\116\51\50"]["\98\120\111\114"](v,k))`;
82-
lua += `else local _="${ROASTS[1]}" end end;`;
83-
lua += `local x,e=(loadstring or load)(${v.out});if x then local s,m=pcall(x)if not s then warn("\82\85\78\84\73\77\69\95\69\82\82: "..tostring(m))end else warn("\86\77\95\69\82\82: "..tostring(e))end end;`;
84-
lua += `${v.vm}(${v.tab},${key});`;
85-
86-
// Table Termination Slop
87-
lua += `local ${generateBarcode(8)}={["\82\79\65\83\84"]="${ROASTS[2]}",["\74\85\78\75"]="${Math.random().toString(36).repeat(5)}"};`;
88-
89-
output.value = lua;
90-
btnDown.style.visibility = "visible";
91-
status.innerText = "POBFUS: SUCCESS";
92-
} catch (e) {
93-
status.innerText = "ERROR: COMPILER_CRASH";
94-
} finally {
95-
btnRun.disabled = false;
96-
}
82+
const v = { env: _barcode(12), vm: _barcode(14), out: _barcode(10), tab: _barcode(16) };
83+
84+
// BUILD THE MOONSEC BRICK
85+
let res = `--[[${LOGO_TEXT}\n[!] POBFUS_1.11.01 // CAMBUSCATE_0.2.1]]\n`;
86+
res += `local ${v.env}=(getfenv(0) or _G);local ${v.out}="";local ${v.tab}={${stream.join(',')}};`;
87+
res += `local function ${v.vm}(d,k)for _,v in pairs(d)do if type(v)=="\110\117\109\98\101\114"then `;
88+
res += `${v.out}=${v.out}..${v.env}["\115\116\114\105\110\103"]["\99\104\97\114"](${v.env}["\98\105\116\51\50"]["\98\120\111\114"](v,k))`;
89+
res += `else local _="${ROASTS[1]}" end end;`;
90+
res += `local x,e=(loadstring or load)(${v.out});if x then pcall(x)else warn("VM_FATAL_0.2.1")end end;${v.vm}(${v.tab},${key});`;
91+
92+
oEl.value = res;
93+
sEl.innerText = "STATUS: SUCCESS_1.11.01";
94+
} catch (e) {
95+
sEl.innerText = "STATUS: ENGINE_CRASH";
96+
}
97+
}, 50);
9798
};
9899

99-
btnCopy.onclick = () => {
100-
output.select();
101-
document.execCommand('copy');
102-
status.innerText = "COPIED_TO_CLIPBOARD";
100+
// Universal Copy
101+
document.getElementById('cp').onclick = () => {
102+
if (!oEl.value) return;
103+
navigator.clipboard.writeText(oEl.value).then(() => {
104+
sEl.innerText = "COPIED!";
105+
});
103106
};
104107

105-
btnDown.onclick = () => {
106-
const blob = new Blob([output.value], { type: 'text/plain' });
108+
// Mobile/PC Download
109+
document.getElementById('dl').onclick = () => {
110+
if (!oEl.value) return;
111+
const blob = new Blob([oEl.value], { type: 'text/plain' });
112+
const url = URL.createObjectURL(blob);
107113
const a = document.createElement('a');
108-
a.href = URL.createObjectURL(blob);
109-
a.download = generateFileName();
114+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
115+
let name = "pobfus-";
116+
for(let i=0; i<20; i++) name += chars.charAt(Math.floor(Math.random() * chars.length));
117+
a.href = url;
118+
a.download = name + ".lua";
110119
a.click();
111-
status.innerText = "FILE_EXPORTED";
112120
};
113-
});
121+
};
114122
})();

0 commit comments

Comments
 (0)