File size: 24,889 Bytes
f72ec98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PUBG Recoil Control Macro</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .weapon-btn.active {
            transform: scale(0.95);
            box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
        }
        .recoil-pattern {
            background-image: radial-gradient(circle, rgba(255,0,0,0.2) 1px, transparent 1px);
            background-size: 20px 20px;
        }
        .macro-key {
            transition: all 0.2s ease;
        }
        .macro-key.active {
            transform: translateY(2px);
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
        }
    </style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
    <div class="container mx-auto px-4 py-8">
        <header class="mb-8 text-center">
            <h1 class="text-4xl font-bold text-yellow-400 mb-2">
                <i class="fas fa-crosshairs mr-2"></i>PUBG Recoil Macro
            </h1>
            <p class="text-gray-400">Advanced recoil control system for PUBG Battlegrounds</p>
            <div class="mt-4 bg-gray-800 rounded-lg p-3 max-w-2xl mx-auto">
                <p class="text-sm text-yellow-200"><i class="fas fa-exclamation-triangle mr-2"></i>Warning: Using macros may violate PUBG's terms of service. Use at your own risk.</p>
            </div>
        </header>

        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
            <!-- Weapon Selection -->
            <div class="bg-gray-800 rounded-xl p-6 shadow-lg">
                <h2 class="text-xl font-semibold mb-4 text-yellow-400">
                    <i class="fas fa-gun mr-2"></i>Weapon Profile
                </h2>
                
                <div class="grid grid-cols-2 gap-3 mb-6">
                    <button class="weapon-btn bg-gray-700 hover:bg-gray-600 py-3 rounded-lg transition-all flex flex-col items-center" data-weapon="m416">
                        <img src="https://via.placeholder.com/50/333/fff?text=M416" class="w-10 h-10 mb-1">
                        <span>M416</span>
                    </button>
                    <button class="weapon-btn bg-gray-700 hover:bg-gray-600 py-3 rounded-lg transition-all flex flex-col items-center" data-weapon="akm">
                        <img src="https://via.placeholder.com/50/333/fff?text=AKM" class="w-10 h-10 mb-1">
                        <span>AKM</span>
                    </button>
                    <button class="weapon-btn bg-gray-700 hover:bg-gray-600 py-3 rounded-lg transition-all flex flex-col items-center" data-weapon="scar">
                        <img src="https://via.placeholder.com/50/333/fff?text=SCAR" class="w-10 h-10 mb-1">
                        <span>SCAR-L</span>
                    </button>
                    <button class="weapon-btn bg-gray-700 hover:bg-gray-600 py-3 rounded-lg transition-all flex flex-col items-center" data-weapon="beryl">
                        <img src="https://via.placeholder.com/50/333/fff?text=Beryl" class="w-10 h-10 mb-1">
                        <span>Beryl</span>
                    </button>
                </div>
                
                <div class="mb-4">
                    <label class="block text-gray-400 mb-2">Vertical Recoil</label>
                    <input type="range" min="1" max="100" value="50" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="verticalSlider">
                    <div class="flex justify-between text-xs text-gray-400 mt-1">
                        <span>Low</span>
                        <span>Medium</span>
                        <span>High</span>
                    </div>
                </div>
                
                <div class="mb-4">
                    <label class="block text-gray-400 mb-2">Horizontal Recoil</label>
                    <input type="range" min="1" max="100" value="30" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="horizontalSlider">
                    <div class="flex justify-between text-xs text-gray-400 mt-1">
                        <span>Low</span>
                        <span>Medium</span>
                        <span>High</span>
                    </div>
                </div>
                
                <div class="mb-6">
                    <label class="block text-gray-400 mb-2">Fire Rate (ms delay)</label>
                    <input type="range" min="50" max="200" value="100" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="rateSlider">
                    <div class="flex justify-between text-xs text-gray-400 mt-1">
                        <span>Fast</span>
                        <span>Normal</span>
                        <span>Slow</span>
                    </div>
                </div>
                
                <button id="saveProfile" class="w-full bg-green-600 hover:bg-green-700 text-white py-2 rounded-lg font-medium transition">
                    <i class="fas fa-save mr-2"></i>Save Profile
                </button>
            </div>
            
            <!-- Recoil Visualization -->
            <div class="bg-gray-800 rounded-xl p-6 shadow-lg">
                <h2 class="text-xl font-semibold mb-4 text-yellow-400">
                    <i class="fas fa-bullseye mr-2"></i>Recoil Pattern
                </h2>
                
                <div class="recoil-pattern bg-gray-900 rounded-lg h-64 mb-4 relative border border-gray-700">
                    <div id="recoilPath" class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-1 h-1 bg-red-500 rounded-full"></div>
                    <div id="recoilLine" class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-0.5 bg-red-500 opacity-70"></div>
                </div>
                
                <div class="grid grid-cols-2 gap-4 mb-6">
                    <div class="bg-gray-700 p-3 rounded-lg">
                        <div class="text-xs text-gray-400">Vertical</div>
                        <div id="verticalValue" class="text-lg font-mono">50</div>
                    </div>
                    <div class="bg-gray-700 p-3 rounded-lg">
                        <div class="text-xs text-gray-400">Horizontal</div>
                        <div id="horizontalValue" class="text-lg font-mono">30</div>
                    </div>
                    <div class="bg-gray-700 p-3 rounded-lg">
                        <div class="text-xs text-gray-400">Fire Rate</div>
                        <div id="rateValue" class="text-lg font-mono">100ms</div>
                    </div>
                    <div class="bg-gray-700 p-3 rounded-lg">
                        <div class="text-xs text-gray-400">Weapon</div>
                        <div id="weaponValue" class="text-lg">M416</div>
                    </div>
                </div>
                
                <button id="testRecoil" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 rounded-lg font-medium transition mb-3">
                    <i class="fas fa-play mr-2"></i>Test Recoil
                </button>
                <button id="resetRecoil" class="w-full bg-gray-600 hover:bg-gray-700 text-white py-2 rounded-lg font-medium transition">
                    <i class="fas fa-undo mr-2"></i>Reset
                </button>
            </div>
            
            <!-- Macro Configuration -->
            <div class="bg-gray-800 rounded-xl p-6 shadow-lg">
                <h2 class="text-xl font-semibold mb-4 text-yellow-400">
                    <i class="fas fa-keyboard mr-2"></i>Macro Settings
                </h2>
                
                <div class="mb-6">
                    <label class="block text-gray-400 mb-2">Activation Key</label>
                    <div class="grid grid-cols-3 gap-2">
                        <button class="macro-key bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-key="mouse4">
                            <i class="fas fa-mouse-pointer mr-1"></i> Mouse 4
                        </button>
                        <button class="macro-key bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-key="mouse5">
                            <i class="fas fa-mouse-pointer mr-1"></i> Mouse 5
                        </button>
                        <button class="macro-key bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-key="ctrl">
                            Ctrl
                        </button>
                        <button class="macro-key bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-key="shift">
                            Shift
                        </button>
                        <button class="macro-key bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-key="alt">
                            Alt
                        </button>
                        <button class="macro-key bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-key="space">
                            Space
                        </button>
                    </div>
                </div>
                
                <div class="mb-6">
                    <label class="block text-gray-400 mb-2">Fire Mode</label>
                    <div class="grid grid-cols-3 gap-2">
                        <button class="fire-mode bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-mode="auto">
                            Auto
                        </button>
                        <button class="fire-mode bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-mode="burst">
                            Burst (3)
                        </button>
                        <button class="fire-mode bg-gray-700 hover:bg-gray-600 py-3 rounded transition-all" data-mode="single">
                            Single
                        </button>
                    </div>
                </div>
                
                <div class="mb-6">
                    <label class="block text-gray-400 mb-2">Scope Sensitivity Multiplier</label>
                    <input type="range" min="50" max="200" value="100" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="scopeSlider">
                    <div class="flex justify-between text-xs text-gray-400 mt-1">
                        <span>50%</span>
                        <span>100%</span>
                        <span>200%</span>
                    </div>
                </div>
                
                <div class="flex space-x-3">
                    <button id="exportConfig" class="flex-1 bg-purple-600 hover:bg-purple-700 text-white py-2 rounded-lg font-medium transition">
                        <i class="fas fa-file-export mr-2"></i>Export
                    </button>
                    <button id="importConfig" class="flex-1 bg-indigo-600 hover:bg-indigo-700 text-white py-2 rounded-lg font-medium transition">
                        <i class="fas fa-file-import mr-2"></i>Import
                    </button>
                </div>
            </div>
        </div>
        
        <!-- Script Output -->
        <div class="mt-8 bg-gray-800 rounded-xl p-6 shadow-lg">
            <h2 class="text-xl font-semibold mb-4 text-yellow-400">
                <i class="fas fa-code mr-2"></i>Macro Script
            </h2>
            <div class="bg-gray-900 p-4 rounded-lg font-mono text-sm overflow-x-auto">
                <pre id="scriptOutput">// Select a weapon and configure settings to generate script</pre>
            </div>
            <div class="mt-4 flex justify-end">
                <button id="copyScript" class="bg-gray-700 hover:bg-gray-600 px-4 py-2 rounded-lg transition">
                    <i class="fas fa-copy mr-2"></i>Copy to Clipboard
                </button>
            </div>
        </div>
    </div>

    <script>
        // Current configuration
        const config = {
            weapon: 'm416',
            vertical: 50,
            horizontal: 30,
            rate: 100,
            key: 'mouse4',
            mode: 'auto',
            scope: 100
        };
        
        // Weapon profiles (recoil patterns)
        const weaponProfiles = {
            m416: { name: 'M416', verticalBase: 50, horizontalBase: 30 },
            akm: { name: 'AKM', verticalBase: 70, horizontalBase: 40 },
            scar: { name: 'SCAR-L', verticalBase: 45, horizontalBase: 25 },
            beryl: { name: 'Beryl M762', verticalBase: 65, horizontalBase: 50 }
        };
        
        // DOM elements
        const weaponBtns = document.querySelectorAll('.weapon-btn');
        const macroKeys = document.querySelectorAll('.macro-key');
        const fireModes = document.querySelectorAll('.fire-mode');
        const verticalSlider = document.getElementById('verticalSlider');
        const horizontalSlider = document.getElementById('horizontalSlider');
        const rateSlider = document.getElementById('rateSlider');
        const scopeSlider = document.getElementById('scopeSlider');
        const verticalValue = document.getElementById('verticalValue');
        const horizontalValue = document.getElementById('horizontalValue');
        const rateValue = document.getElementById('rateValue');
        const weaponValue = document.getElementById('weaponValue');
        const recoilPath = document.getElementById('recoilPath');
        const recoilLine = document.getElementById('recoilLine');
        const testRecoilBtn = document.getElementById('testRecoil');
        const resetRecoilBtn = document.getElementById('resetRecoil');
        const saveProfileBtn = document.getElementById('saveProfile');
        const exportConfigBtn = document.getElementById('exportConfig');
        const importConfigBtn = document.getElementById('importConfig');
        const copyScriptBtn = document.getElementById('copyScript');
        const scriptOutput = document.getElementById('scriptOutput');
        
        // Initialize UI
        function initUI() {
            // Set weapon
            document.querySelector(`.weapon-btn[data-weapon="${config.weapon}"]`).classList.add('active');
            weaponValue.textContent = weaponProfiles[config.weapon].name;
            
            // Set sliders
            verticalSlider.value = config.vertical;
            horizontalSlider.value = config.horizontal;
            rateSlider.value = config.rate;
            scopeSlider.value = config.scope;
            
            // Set key
            document.querySelector(`.macro-key[data-key="${config.key}"]`).classList.add('active');
            
            // Set fire mode
            document.querySelector(`.fire-mode[data-mode="${config.mode}"]`).classList.add('active');
            
            // Update displayed values
            updateValues();
            generateScript();
        }
        
        // Update displayed values
        function updateValues() {
            verticalValue.textContent = config.vertical;
            horizontalValue.textContent = config.horizontal;
            rateValue.textContent = `${config.rate}ms`;
        }
        
        // Weapon selection
        weaponBtns.forEach(btn => {
            btn.addEventListener('click', () => {
                weaponBtns.forEach(b => b.classList.remove('active'));
                btn.classList.add('active');
                
                config.weapon = btn.dataset.weapon;
                const profile = weaponProfiles[config.weapon];
                
                // Set base values for this weapon
                config.vertical = profile.verticalBase;
                config.horizontal = profile.horizontalBase;
                
                // Update sliders
                verticalSlider.value = config.vertical;
                horizontalSlider.value = config.horizontal;
                
                weaponValue.textContent = profile.name;
                updateValues();
                generateScript();
            });
        });
        
        // Macro key selection
        macroKeys.forEach(key => {
            key.addEventListener('click', () => {
                macroKeys.forEach(k => k.classList.remove('active'));
                key.classList.add('active');
                config.key = key.dataset.key;
                generateScript();
            });
        });
        
        // Fire mode selection
        fireModes.forEach(mode => {
            mode.addEventListener('click', () => {
                fireModes.forEach(m => m.classList.remove('active'));
                mode.classList.add('active');
                config.mode = mode.dataset.mode;
                generateScript();
            });
        });
        
        // Slider events
        verticalSlider.addEventListener('input', () => {
            config.vertical = verticalSlider.value;
            verticalValue.textContent = config.vertical;
            generateScript();
        });
        
        horizontalSlider.addEventListener('input', () => {
            config.horizontal = horizontalSlider.value;
            horizontalValue.textContent = config.horizontal;
            generateScript();
        });
        
        rateSlider.addEventListener('input', () => {
            config.rate = rateSlider.value;
            rateValue.textContent = `${config.rate}ms`;
            generateScript();
        });
        
        scopeSlider.addEventListener('input', () => {
            config.scope = scopeSlider.value;
            generateScript();
        });
        
        // Test recoil pattern
        testRecoilBtn.addEventListener('click', () => {
            const patternContainer = document.querySelector('.recoil-pattern');
            const width = patternContainer.clientWidth;
            const height = patternContainer.clientHeight;
            
            // Clear previous line
            recoilLine.style.height = '0';
            recoilLine.style.transform = 'translate(-50%, -50%) rotate(0)';
            
            // Calculate recoil pattern
            const vertical = config.vertical / 10;
            const horizontal = config.horizontal / 50;
            const steps = 20;
            let path = '';
            
            // Animate recoil
            let currentY = 0;
            let currentX = 0;
            let angle = 0;
            
            const interval = setInterval(() => {
                // Add some randomness to simulate actual recoil
                const randX = (Math.random() - 0.5) * 5;
                const randY = (Math.random() - 0.5) * 2;
                
                currentY += vertical / steps + randY;
                currentX += (Math.random() > 0.5 ? horizontal : -horizontal) / steps + randX;
                
                // Limit to container
                currentY = Math.min(currentY, height/2 - 10);
                currentX = Math.max(Math.min(currentX, width/2 - 10), -width/2 + 10);
                
                // Update position
                recoilPath.style.transform = `translate(calc(-50% + ${currentX}px), calc(-50% + ${currentY}px))`;
                
                // Update line
                angle = Math.atan2(currentY, currentX) * (180 / Math.PI);
                const length = Math.sqrt(currentX*currentX + currentY*currentY);
                recoilLine.style.height = `${length}px`;
                recoilLine.style.transform = `translate(-50%, -50%) rotate(${-angle}deg)`;
                
            }, 50);
            
            // Stop after 2 seconds
            setTimeout(() => {
                clearInterval(interval);
            }, 2000);
        });
        
        // Reset recoil visualization
        resetRecoilBtn.addEventListener('click', () => {
            recoilPath.style.transform = 'translate(-50%, -50%)';
            recoilLine.style.height = '0';
        });
        
        // Save profile (in this demo just shows a message)
        saveProfileBtn.addEventListener('click', () => {
            alert(`Profile for ${weaponProfiles[config.weapon].name} saved!`);
        });
        
        // Export config
        exportConfigBtn.addEventListener('click', () => {
            const configStr = JSON.stringify(config, null, 2);
            alert('Copy this configuration:\n\n' + configStr);
        });
        
        // Import config
        importConfigBtn.addEventListener('click', () => {
            const configStr = prompt('Paste your configuration JSON:');
            if (configStr) {
                try {
                    const importedConfig = JSON.parse(configStr);
                    Object.assign(config, importedConfig);
                    initUI();
                } catch (e) {
                    alert('Invalid configuration format');
                }
            }
        });
        
        // Copy script to clipboard
        copyScriptBtn.addEventListener('click', () => {
            navigator.clipboard.writeText(scriptOutput.textContent)
                .then(() => {
                    const originalText = copyScriptBtn.innerHTML;
                    copyScriptBtn.innerHTML = '<i class="fas fa-check mr-2"></i>Copied!';
                    setTimeout(() => {
                        copyScriptBtn.innerHTML = originalText;
                    }, 2000);
                })
                .catch(err => {
                    console.error('Failed to copy: ', err);
                });
        });
        
        // Generate the macro script
        function generateScript() {
            // This is a simulation - actual macro scripts would be specific to your mouse/keyboard software
            let script = `// PUBG Recoil Control Macro for ${weaponProfiles[config.weapon].name}
// Activation Key: ${config.key.toUpperCase()}
// Fire Mode: ${config.mode.toUpperCase()}
// Vertical Recoil: ${config.vertical} | Horizontal Recoil: ${config.horizontal}
// Fire Rate: ${config.rate}ms | Scope Sensitivity: ${config.scope}%

function main() {
    // Check if left mouse button is pressed (firing)
    if (event.isPressed("MOUSE_LEFT")) {
        // Apply recoil compensation
        ${getRecoilCompensationCode()}
        
        // Add delay between shots based on fire rate
        delay(${config.rate});
    }
}

// Bind to activation key
bind("${config.key.toUpperCase()}", "TOGGLE", main);`;

            scriptOutput.textContent = script;
        }
        
        // Helper to generate recoil compensation code based on settings
        function getRecoilCompensationCode() {
            let code = '';
            const verticalMove = config.vertical / 1000;
            const horizontalMove = config.horizontal / 1000;
            
            if (config.mode === 'auto') {
                code = `// Continuous recoil control for auto fire
moveMouseRelative(0, ${verticalMove.toFixed(3)});
if (random() > 0.5) {
    moveMouseRelative(${horizontalMove.toFixed(3)}, 0);
} else {
    moveMouseRelative(-${horizontalMove.toFixed(3)}, 0);
}`;
            } else if (config.mode === 'burst') {
                code = `// Burst fire recoil control (3 shots)
if (burstCount < 3) {
    moveMouseRelative(0, ${(verticalMove * 1.5).toFixed(3)});
    if (random() > 0.5) {
        moveMouseRelative(${(horizontalMove * 1.2).toFixed(3)}, 0);
    } else {
        moveMouseRelative(-${(horizontalMove * 1.2).toFixed(3)}, 0);
    }
    burstCount++;
} else {
    delay(300); // Burst delay
    burstCount = 0;
}`;
            } else { // single
                code = `// Single shot recoil control
moveMouseRelative(0, ${(verticalMove * 2).toFixed(3)});
if (random() > 0.5) {
    moveMouseRelative(${(horizontalMove * 1.5).toFixed(3)}, 0);
} else {
    moveMouseRelative(-${(horizontalMove * 1.5).toFixed(3)}, 0);
}`;
            }
            
            return code;
        }
        
        // Initialize
        initUI();
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=fvo123456/test1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>