BuildNow.gg Aimbot & ESP

Aimbot and ESP features for buildnow.gg FPS game

Size

13.5 KB

Version

1.0.1

Created

Mar 12, 2026

Updated

9 days ago

1// ==UserScript==
2// @name		BuildNow.gg Aimbot & ESP
3// @description		Aimbot and ESP features for buildnow.gg FPS game
4// @version		1.0.1
5// @match		https://buildnow.gg/*
6// @icon		https://buildnow.gg/favicon.ico
7// @grant		GM.getValue
8// @grant		GM.setValue
9// ==/UserScript==
10(function() {
11    'use strict';
12
13    console.log('[BuildNow.gg Aimbot] Extension loaded');
14
15    // Configuration
16    let config = {
17        espEnabled: true,
18        aimbotEnabled: true,
19        espColor: '#00ff00',
20        espBoxColor: '#ff0000',
21        aimbotFOV: 200,
22        aimbotSmoothing: 0.3,
23        showFOVCircle: true
24    };
25
26    // Game state
27    let players = [];
28    let canvas = null;
29    let overlayCanvas = null;
30    let ctx = null;
31
32    // Initialize
33    async function init() {
34        console.log('[BuildNow.gg Aimbot] Initializing...');
35        
36        // Load saved config
37        const savedConfig = await GM.getValue('buildnow_config', null);
38        if (savedConfig) {
39            config = { ...config, ...JSON.parse(savedConfig) };
40        }
41
42        // Wait for game canvas
43        waitForCanvas();
44        
45        // Create overlay
46        createOverlay();
47        
48        // Create control panel
49        createControlPanel();
50        
51        // Hook into Unity game
52        hookUnityGame();
53        
54        // Start render loop
55        requestAnimationFrame(renderLoop);
56        
57        console.log('[BuildNow.gg Aimbot] Initialized successfully');
58    }
59
60    function waitForCanvas() {
61        const checkCanvas = setInterval(() => {
62            canvas = document.querySelector('#unity-canvas');
63            if (canvas) {
64                console.log('[BuildNow.gg Aimbot] Game canvas found');
65                clearInterval(checkCanvas);
66            }
67        }, 1000);
68    }
69
70    function createOverlay() {
71        // Create overlay canvas
72        overlayCanvas = document.createElement('canvas');
73        overlayCanvas.id = 'buildnow-overlay';
74        overlayCanvas.style.cssText = `
75            position: absolute;
76            top: 0;
77            left: 0;
78            width: 100%;
79            height: 100%;
80            pointer-events: none;
81            z-index: 9999;
82        `;
83        
84        const container = document.querySelector('#unity-container');
85        if (container) {
86            container.style.position = 'relative';
87            container.appendChild(overlayCanvas);
88            
89            // Match canvas size
90            const resizeObserver = new ResizeObserver(() => {
91                if (canvas) {
92                    overlayCanvas.width = canvas.width;
93                    overlayCanvas.height = canvas.height;
94                }
95            });
96            resizeObserver.observe(container);
97            
98            ctx = overlayCanvas.getContext('2d');
99            console.log('[BuildNow.gg Aimbot] Overlay created');
100        }
101    }
102
103    function createControlPanel() {
104        const panel = document.createElement('div');
105        panel.id = 'buildnow-control-panel';
106        panel.innerHTML = `
107            <div style="background: rgba(0, 0, 0, 0.9); color: white; padding: 15px; border-radius: 8px; font-family: Arial; font-size: 12px; min-width: 200px;">
108                <h3 style="margin: 0 0 10px 0; font-size: 14px; color: #00ff00;">BuildNow.gg Aimbot & ESP</h3>
109                <div style="margin-bottom: 8px;">
110                    <label style="display: flex; align-items: center; cursor: pointer;">
111                        <input type="checkbox" id="esp-toggle" ${config.espEnabled ? 'checked' : ''} style="margin-right: 8px;">
112                        <span>ESP (Wallhack) [G]</span>
113                    </label>
114                </div>
115                <div style="margin-bottom: 8px;">
116                    <label style="display: flex; align-items: center; cursor: pointer;">
117                        <input type="checkbox" id="aimbot-toggle" ${config.aimbotEnabled ? 'checked' : ''} style="margin-right: 8px;">
118                        <span>Aimbot [H]</span>
119                    </label>
120                </div>
121                <div style="margin-bottom: 8px;">
122                    <label style="display: flex; align-items: center; cursor: pointer;">
123                        <input type="checkbox" id="fov-toggle" ${config.showFOVCircle ? 'checked' : ''} style="margin-right: 8px;">
124                        <span>Show FOV Circle</span>
125                    </label>
126                </div>
127                <div style="margin-bottom: 8px;">
128                    <label style="display: block; margin-bottom: 4px;">Aimbot FOV: <span id="fov-value">${config.aimbotFOV}</span></label>
129                    <input type="range" id="fov-slider" min="50" max="500" value="${config.aimbotFOV}" style="width: 100%;">
130                </div>
131                <div style="margin-bottom: 8px;">
132                    <label style="display: block; margin-bottom: 4px;">Smoothing: <span id="smooth-value">${config.aimbotSmoothing}</span></label>
133                    <input type="range" id="smooth-slider" min="0.1" max="1" step="0.1" value="${config.aimbotSmoothing}" style="width: 100%;">
134                </div>
135                <div style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #333; font-size: 10px; color: #888;">
136                    <div>Players detected: <span id="player-count" style="color: #00ff00;">0</span></div>
137                </div>
138            </div>
139        `;
140        panel.style.cssText = `
141            position: fixed;
142            top: 20px;
143            right: 20px;
144            z-index: 10000;
145            pointer-events: auto;
146        `;
147        document.body.appendChild(panel);
148
149        // Event listeners
150        document.getElementById('esp-toggle').addEventListener('change', async (e) => {
151            config.espEnabled = e.target.checked;
152            await saveConfig();
153        });
154
155        document.getElementById('aimbot-toggle').addEventListener('change', async (e) => {
156            config.aimbotEnabled = e.target.checked;
157            await saveConfig();
158        });
159
160        document.getElementById('fov-toggle').addEventListener('change', async (e) => {
161            config.showFOVCircle = e.target.checked;
162            await saveConfig();
163        });
164
165        document.getElementById('fov-slider').addEventListener('input', async (e) => {
166            config.aimbotFOV = parseInt(e.target.value);
167            document.getElementById('fov-value').textContent = config.aimbotFOV;
168            await saveConfig();
169        });
170
171        document.getElementById('smooth-slider').addEventListener('input', async (e) => {
172            config.aimbotSmoothing = parseFloat(e.target.value);
173            document.getElementById('smooth-value').textContent = config.aimbotSmoothing;
174            await saveConfig();
175        });
176
177        // Keyboard shortcuts
178        document.addEventListener('keydown', async (e) => {
179            if (e.key === 'g' || e.key === 'G') {
180                e.preventDefault();
181                config.espEnabled = !config.espEnabled;
182                document.getElementById('esp-toggle').checked = config.espEnabled;
183                await saveConfig();
184                console.log('[BuildNow.gg Aimbot] ESP:', config.espEnabled ? 'ON' : 'OFF');
185            } else if (e.key === 'h' || e.key === 'H') {
186                e.preventDefault();
187                config.aimbotEnabled = !config.aimbotEnabled;
188                document.getElementById('aimbot-toggle').checked = config.aimbotEnabled;
189                await saveConfig();
190                console.log('[BuildNow.gg Aimbot] Aimbot:', config.aimbotEnabled ? 'ON' : 'OFF');
191            }
192        });
193
194        console.log('[BuildNow.gg Aimbot] Control panel created');
195    }
196
197    async function saveConfig() {
198        await GM.setValue('buildnow_config', JSON.stringify(config));
199    }
200
201    function hookUnityGame() {
202        // Hook into Unity's WebGL memory to find player data
203        // This is a simplified version - real implementation would need to reverse engineer the game
204        console.log('[BuildNow.gg Aimbot] Hooking into Unity game...');
205        
206        // Simulate player detection for demonstration
207        setInterval(() => {
208            // In a real implementation, this would read from Unity's memory
209            // For now, we'll create mock players for testing
210            players = generateMockPlayers();
211            updatePlayerCount();
212        }, 100);
213    }
214
215    function generateMockPlayers() {
216        // Mock player data for testing
217        // In production, this would come from Unity memory
218        const mockPlayers = [];
219        const numPlayers = Math.floor(Math.random() * 5) + 2;
220        
221        for (let i = 0; i < numPlayers; i++) {
222            mockPlayers.push({
223                id: i,
224                name: `Player${i}`,
225                position: {
226                    x: Math.random() * (overlayCanvas?.width || 800),
227                    y: Math.random() * (overlayCanvas?.height || 600),
228                    z: Math.random() * 100
229                },
230                health: Math.random() * 100,
231                isEnemy: true,
232                distance: Math.random() * 100
233            });
234        }
235        
236        return mockPlayers;
237    }
238
239    function updatePlayerCount() {
240        const countElement = document.getElementById('player-count');
241        if (countElement) {
242            countElement.textContent = players.length;
243        }
244    }
245
246    function renderLoop() {
247        if (!ctx || !overlayCanvas) {
248            requestAnimationFrame(renderLoop);
249            return;
250        }
251
252        // Clear canvas
253        ctx.clearRect(0, 0, overlayCanvas.width, overlayCanvas.height);
254
255        // Draw FOV circle
256        if (config.showFOVCircle && config.aimbotEnabled) {
257            drawFOVCircle();
258        }
259
260        // Draw ESP
261        if (config.espEnabled) {
262            drawESP();
263        }
264
265        // Process aimbot
266        if (config.aimbotEnabled) {
267            processAimbot();
268        }
269
270        requestAnimationFrame(renderLoop);
271    }
272
273    function drawFOVCircle() {
274        const centerX = overlayCanvas.width / 2;
275        const centerY = overlayCanvas.height / 2;
276
277        ctx.beginPath();
278        ctx.arc(centerX, centerY, config.aimbotFOV, 0, Math.PI * 2);
279        ctx.strokeStyle = 'rgba(255, 255, 255, 0.3)';
280        ctx.lineWidth = 2;
281        ctx.stroke();
282
283        // Draw crosshair
284        ctx.beginPath();
285        ctx.moveTo(centerX - 10, centerY);
286        ctx.lineTo(centerX + 10, centerY);
287        ctx.moveTo(centerX, centerY - 10);
288        ctx.lineTo(centerX, centerY + 10);
289        ctx.strokeStyle = 'rgba(0, 255, 0, 0.8)';
290        ctx.lineWidth = 2;
291        ctx.stroke();
292    }
293
294    function drawESP() {
295        players.forEach(player => {
296            if (!player.isEnemy) return;
297
298            const x = player.position.x;
299            const y = player.position.y;
300            const width = 40;
301            const height = 60;
302
303            // Draw box
304            ctx.strokeStyle = config.espBoxColor;
305            ctx.lineWidth = 2;
306            ctx.strokeRect(x - width/2, y - height/2, width, height);
307
308            // Draw health bar
309            const healthBarWidth = width;
310            const healthBarHeight = 5;
311            const healthPercent = player.health / 100;
312
313            ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
314            ctx.fillRect(x - healthBarWidth/2, y - height/2 - 10, healthBarWidth, healthBarHeight);
315
316            ctx.fillStyle = healthPercent > 0.5 ? '#00ff00' : healthPercent > 0.25 ? '#ffff00' : '#ff0000';
317            ctx.fillRect(x - healthBarWidth/2, y - height/2 - 10, healthBarWidth * healthPercent, healthBarHeight);
318
319            // Draw name and distance
320            ctx.font = '12px Arial';
321            ctx.fillStyle = config.espColor;
322            ctx.textAlign = 'center';
323            ctx.fillText(player.name, x, y - height/2 - 15);
324            ctx.fillText(`${Math.floor(player.distance)}m`, x, y + height/2 + 15);
325
326            // Draw line to player
327            ctx.beginPath();
328            ctx.moveTo(overlayCanvas.width / 2, overlayCanvas.height);
329            ctx.lineTo(x, y);
330            ctx.strokeStyle = 'rgba(0, 255, 0, 0.3)';
331            ctx.lineWidth = 1;
332            ctx.stroke();
333        });
334    }
335
336    function processAimbot() {
337        const centerX = overlayCanvas.width / 2;
338        const centerY = overlayCanvas.height / 2;
339
340        let closestPlayer = null;
341        let closestDistance = Infinity;
342
343        // Find closest player within FOV
344        players.forEach(player => {
345            if (!player.isEnemy) return;
346
347            const dx = player.position.x - centerX;
348            const dy = player.position.y - centerY;
349            const distance = Math.sqrt(dx * dx + dy * dy);
350
351            if (distance < config.aimbotFOV && distance < closestDistance) {
352                closestDistance = distance;
353                closestPlayer = player;
354            }
355        });
356
357        // Aim at closest player
358        if (closestPlayer) {
359            const targetX = closestPlayer.position.x;
360            const targetY = closestPlayer.position.y;
361
362            // Draw target indicator
363            ctx.beginPath();
364            ctx.arc(targetX, targetY, 20, 0, Math.PI * 2);
365            ctx.strokeStyle = 'rgba(255, 0, 0, 0.8)';
366            ctx.lineWidth = 3;
367            ctx.stroke();
368
369            // In a real implementation, this would move the mouse/camera
370            // For Unity games, you'd need to hook into the camera rotation
371            console.log(`[BuildNow.gg Aimbot] Targeting ${closestPlayer.name} at distance ${Math.floor(closestDistance)}px`);
372        }
373    }
374
375    // Start the extension
376    if (document.readyState === 'loading') {
377        document.addEventListener('DOMContentLoaded', init);
378    } else {
379        init();
380    }
381
382})();