Crosshair for .io games (secret menu - 'Ctrl+W')

Tell me in feedback what should I do more??

Size

9.5 KB

Version

2.1

Created

Mar 17, 2026

Updated

about 1 month ago

1// ==UserScript==
2// @name       Crosshair for .io games (secret menu - 'Ctrl+W')
3// @version      2.1
4// @description Tell me in feedback what should I do more??
5// @author       W cheats
6// @match        *://*poxel.io/*
7// @match        *://*kour.io/*
8// @match        *://*cryzen.io/*
9// @match        *://*veck.io/*
10// @namespace http://tampermonkey.net/
11// @license   Friends
12// @downloadURL https://update.greasyfork.org/scripts/567549/Crosshair%20for%20io%20games%20%28secret%20menu%20-%20%27Ctrl%2BW%27%29.user.js
13// @updateURL https://update.greasyfork.org/scripts/567549/Crosshair%20for%20io%20games%20%28secret%20menu%20-%20%27Ctrl%2BW%27%29.meta.js
14// ==/UserScript==
15
16(function () {
17    'use strict';
18
19    const STORAGE_KEY = 'crosshair-settings';
20    function saveSettings(style) {
21        localStorage.setItem(STORAGE_KEY, JSON.stringify({ style }));
22    }
23    function loadSettings() {
24        return JSON.parse(localStorage.getItem(STORAGE_KEY) || '{}');
25    }
26
27    const state = {
28        currentStyle: 'ceborix',
29        ...loadSettings()
30    };
31
32    const crosshair = document.createElement('div');
33    crosshair.id = 'custom-crosshair';
34    crosshair.style.position = 'fixed';
35    crosshair.style.top = '50%';
36    crosshair.style.left = '50%';
37    crosshair.style.transform = 'translate(-50%, -50%)';
38    crosshair.style.zIndex = '9999';
39    crosshair.style.pointerEvents = 'none';
40    document.body.appendChild(crosshair);
41
42    function clearCrosshair() {
43        crosshair.innerHTML = '';
44        crosshair.style.background = '';
45        crosshair.style.border = '';
46        crosshair.style.borderRadius = '';
47        crosshair.style.filter = '';
48        crosshair.style.width = '';
49        crosshair.style.height = '';
50        crosshair.style.maskImage = '';
51        crosshair.style.webkitMaskImage = '';
52        crosshair.style.display = 'none';
53    }
54
55    function applyCrosshair(style) {
56        clearCrosshair();
57        if (!style) return;
58
59        crosshair.style.display = 'flex';
60        crosshair.style.alignItems = 'center';
61        crosshair.style.justifyContent = 'center';
62
63               switch (style) {
64           case 'myrrr':
65                crosshair.style.width = '15px';
66                crosshair.style.height = '15px';
67                crosshair.style.filter = 'drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #cc88ff)';
68                const horiz = document.createElement('div');
69                Object.assign(horiz.style, {
70                    position: 'absolute',
71                    width: '15px',
72                    height: '3px',
73                    background: 'linear-gradient(to bottom, #ffffff, #e0ccff)',
74                    borderRadius: '1px',
75                });
76                const vert = document.createElement('div');
77                Object.assign(vert.style, {
78                    position: 'absolute',
79                    width: '3px',
80                    height: '15px',
81                    background: 'linear-gradient(to bottom, #ffffff, #e0ccff)',
82                    borderRadius: '1px',
83                });
84                crosshair.appendChild(horiz);
85                crosshair.appendChild(vert);
86                break;
87
88            case 'dot':
89                crosshair.style.width = '6px';
90                crosshair.style.height = '6px';
91                crosshair.style.borderRadius = '50%';
92                crosshair.style.background = '#fff';
93                crosshair.style.filter = 'drop-shadow(0 0 4px #66f)';
94                break;
95
96            case 'shotgun':
97                crosshair.style.width = '40px';
98                crosshair.style.height = '40px';
99                crosshair.style.border = '4px solid #fff';
100                crosshair.style.borderRadius = '50%';
101                crosshair.style.boxSizing = 'border-box';
102                crosshair.style.background = '(#fff, 0.1)';
103                crosshair.style.filter = 'drop-shadow(0 0 8px #66f';
104                break;
105
106            case 'ceborix':
107                crosshair.style.width = '11px';
108                crosshair.style.height = '11px';
109                crosshair.style.filter = '';
110                const horizCeborix = document.createElement('div');
111                Object.assign(horizCeborix.style, {
112                    position: 'absolute',
113                    width: '11px',
114                    height: '3px',
115                    background: '#fff',
116                    borderRadius: '1px',
117                });
118                const vertCeborix = document.createElement('div');
119                Object.assign(vertCeborix.style, {
120                    position: 'absolute',
121                    width: '3px',
122                    height: '11px',
123                    background: '#fff',
124                    borderRadius: '1px',
125                });
126                crosshair.appendChild(horizCeborix);
127                crosshair.appendChild(vertCeborix);
128                break;
129        }
130    }
131
132    const style = document.createElement('style');
133    style.textContent = `
134        #crosshair-settings {
135        position: fixed;
136        top: 100px;
137        right: 10px;
138        z-index: 99999;
139        font-family: Arial, sans-serif;
140        background-color: #222;
141        border-radius: 20px;
142        padding: 10px;
143        width: auto;
144        height: auto;
145        box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
146        transition: opacity 0.3s ease, transform 0.3s ease;
147    }
148
149        #crosshair-settings-button {
150            background: transparent;
151            border: none;
152            font-size: 24px;
153            color: #fff;
154            cursor: pointer;
155            filter: drop-shadow(0 0 3px #000);
156            transition: transform 0.3s ease;
157        }
158
159        #crosshair-settings-button:hover {
160            transform: scale(1.1);
161        }
162
163        #crosshair-menu {
164            display: none;
165            flex-direction: column;
166            margin-top: 10px;
167            background: rgba(30, 30, 30, 0.95);
168            border-radius: 10px;
169            padding: 10px;
170            box-shadow: 0 0 10px #000;
171            transition: opacity 0.3s ease-in-out;
172        }
173
174        .crosshair-option {
175            display: flex;
176            justify-content: space-between;
177            align-items: center;
178            margin: 8px 0;
179            color: #fff;
180            font-size: 14px;
181            gap: 8px;
182            flex-wrap: nowrap
183        }
184
185        .switch {
186            position: relative;
187            display: inline-block;
188            width: 40px;
189            height: 20px;
190        }
191
192        .switch input {
193            opacity: 0;
194            width: 0;
195            height: 0;
196        }
197
198        .slider {
199            position: absolute;
200            cursor: pointer;
201            top: 0;
202            left: 0;
203            right: 0;
204            bottom: 0;
205            background-color: #ccc;
206            transition: .4s;
207            border-radius: 20px;
208        }
209
210        .slider:before {
211            position: absolute;
212            content: "";
213            height: 16px;
214            width: 16px;
215            left: 2px;
216            bottom: 2px;
217            background-color: white;
218            transition: .4s;
219            border-radius: 50%;
220        }
221
222        input:checked + .slider {
223            background-color: #4caf50;
224        }
225
226        input:checked + .slider:before {
227            transform: translateX(20px);
228        }
229    `;
230    document.head.appendChild(style);
231
232    const menuContainer = document.createElement('div');
233    menuContainer.id = 'crosshair-settings';
234
235    const settingsButton = document.createElement('button');
236    settingsButton.id = 'crosshair-settings-button';
237    settingsButton.innerHTML = '⚙️';
238
239    const menu = document.createElement('div');
240    menu.id = 'crosshair-menu';
241
242const crosshairOptions = [
243    { label: "ceborix's crosshair", key: 'ceborix' },
244    { label: "myrrr's crosshair", key: 'myrrr' },
245    { label: 'Dot', key: 'dot' },
246    { label: 'Shotgun', key: 'shotgun' }
247];
248
249    function createOption(label, styleKey) {
250        const row = document.createElement('div');
251        row.className = 'crosshair-option';
252
253        const text = document.createElement('span');
254        text.textContent = label;
255
256        const toggleContainer = document.createElement('label');
257        toggleContainer.className = 'switch';
258
259        const toggle = document.createElement('input');
260        toggle.type = 'checkbox';
261        toggle.checked = state.currentStyle === styleKey;
262
263        const slider = document.createElement('span');
264        slider.className = 'slider';
265
266        toggle.onchange = () => {
267            if (toggle.checked) {
268                state.currentStyle = styleKey;
269                saveSettings(state.currentStyle);
270                applyCrosshair(state.currentStyle);
271
272                document.querySelectorAll('#crosshair-menu input[type=checkbox]').forEach(cb => {
273                    if (cb !== toggle) cb.checked = false;
274                });
275            } else {
276                state.currentStyle = null;
277                saveSettings(null);
278                clearCrosshair();
279            }
280        };
281
282        toggleContainer.appendChild(toggle);
283        toggleContainer.appendChild(slider);
284        row.appendChild(text);
285        row.appendChild(toggleContainer);
286        return row;
287    }
288
289    crosshairOptions.forEach(opt => menu.appendChild(createOption(opt.label, opt.key)));
290
291    menuContainer.onclick = (e) => {
292    if (e.target.closest('#crosshair-menu')) return;
293
294        menu.style.display = menu.style.display === 'flex' ? 'none' : 'flex';
295    };
296
297
298    menuContainer.appendChild(settingsButton);
299    menuContainer.appendChild(menu);
300    document.body.appendChild(menuContainer);
301
302    applyCrosshair(state.currentStyle);
303})();
304
305//I miss you m̈