Size
18.6 KB
Version
1.1.3
Created
Mar 5, 2026
Updated
about 1 month ago
1// ==UserScript==
2// @name Veck.io Unlock All Weapons & Items
3// @description Unlocks all weapons and items in Veck.io
4// @version 1.1.3
5// @match https://*.veck.io/*
6// @icon https://veck.io/favicon/favicon.ico
7// @grant GM.getValue
8// @grant GM.setValue
9// @grant GM.listValues
10// ==/UserScript==
11(function() {
12 'use strict';
13
14 console.log('[Veck.io Unlocker] Extension loaded - Unlocking ALL weapons and items!');
15
16 // Intercept localStorage to unlock all items
17 const originalSetItem = localStorage.setItem;
18 const originalGetItem = localStorage.getItem;
19
20 // Force unlock all items immediately
21 try {
22 localStorage.setItem('allItemsUnlocked', 'true');
23 localStorage.setItem('rainbowItemsUnlocked', 'true');
24 localStorage.setItem('level', '100');
25 localStorage.setItem('Level', '100');
26 localStorage.setItem('LEVEL', '100');
27 localStorage.setItem('playerLevel', '100');
28 localStorage.setItem('currentLevel', '100');
29 localStorage.setItem('userLevel', '100');
30 localStorage.setItem('xp', '999999999');
31 localStorage.setItem('XP', '999999999');
32 localStorage.setItem('exp', '999999999');
33 localStorage.setItem('EXP', '999999999');
34 localStorage.setItem('experience', '999999999');
35 localStorage.setItem('playerXP', '999999999');
36 localStorage.setItem('coins', '100000');
37 localStorage.setItem('Coins', '100000');
38 localStorage.setItem('COINS', '100000');
39 localStorage.setItem('veckCoins', '100000');
40 localStorage.setItem('money', '100000');
41 localStorage.setItem('currency', '100000');
42 localStorage.setItem('credits', '100000');
43 console.log('[Veck.io Unlocker] ✓ All items unlocked immediately!');
44 console.log('[Veck.io Unlocker] ✓ Coins set to 100000!');
45 } catch (e) {
46 console.error('[Veck.io Unlocker] Error setting initial values:', e);
47 }
48
49 // Override localStorage.setItem to prevent game from locking items
50 localStorage.setItem = function(key, value) {
51 try {
52 // Force unlock flags to always be true
53 if (key === 'allItemsUnlocked' || key === 'rainbowItemsUnlocked') {
54 console.log(`[Veck.io Unlocker] Forcing ${key} to true`);
55 return originalSetItem.call(this, key, 'true');
56 }
57
58 // Keep level at max
59 if (key === 'level' || key === 'Level' || key === 'LEVEL' ||
60 key === 'playerLevel' || key === 'currentLevel' || key === 'userLevel') {
61 const newLevel = parseInt(value) || 0;
62 if (newLevel < 100) {
63 console.log(`[Veck.io Unlocker] Keeping ${key} at 100 (game tried to set ${value})`);
64 return originalSetItem.call(this, key, '100');
65 }
66 }
67
68 // Keep XP at max
69 if (key === 'xp' || key === 'XP' || key === 'exp' || key === 'EXP' ||
70 key === 'experience' || key === 'playerXP') {
71 const newXP = parseInt(value) || 0;
72 if (newXP < 999999999) {
73 console.log(`[Veck.io Unlocker] Keeping ${key} at max (game tried to set ${value})`);
74 return originalSetItem.call(this, key, '999999999');
75 }
76 }
77
78 // Keep coins at 100000
79 if (key === 'coins' || key === 'Coins' || key === 'COINS' ||
80 key === 'veckCoins' || key === 'money' || key === 'currency' || key === 'credits') {
81 const newCoins = parseInt(value) || 0;
82 if (newCoins < 100000) {
83 console.log(`[Veck.io Unlocker] Keeping ${key} at 100000 (game tried to set ${value})`);
84 return originalSetItem.call(this, key, '100000');
85 }
86 }
87
88 // Check if this is game data related to unlocks
89 if (key && typeof value === 'string') {
90 let data = value;
91
92 // Try to parse as JSON
93 try {
94 let parsed = JSON.parse(value);
95
96 // Look for unlock-related data structures
97 if (parsed && typeof parsed === 'object') {
98 let modified = false;
99
100 // Unlock weapons
101 if (parsed.weapons || parsed.Weapons) {
102 console.log('[Veck.io Unlocker] Found weapons data, unlocking all...');
103 let weaponsKey = parsed.weapons ? 'weapons' : 'Weapons';
104 if (Array.isArray(parsed[weaponsKey])) {
105 parsed[weaponsKey] = parsed[weaponsKey].map(w => ({...w, unlocked: true, locked: false, owned: true}));
106 modified = true;
107 } else if (typeof parsed[weaponsKey] === 'object') {
108 for (let wKey in parsed[weaponsKey]) {
109 parsed[weaponsKey][wKey].unlocked = true;
110 parsed[weaponsKey][wKey].locked = false;
111 parsed[weaponsKey][wKey].owned = true;
112 }
113 modified = true;
114 }
115 }
116
117 // Unlock items
118 if (parsed.items || parsed.Items) {
119 console.log('[Veck.io Unlocker] Found items data, unlocking all...');
120 let itemsKey = parsed.items ? 'items' : 'Items';
121 if (Array.isArray(parsed[itemsKey])) {
122 parsed[itemsKey] = parsed[itemsKey].map(i => ({...i, unlocked: true, locked: false, owned: true}));
123 modified = true;
124 } else if (typeof parsed[itemsKey] === 'object') {
125 for (let iKey in parsed[itemsKey]) {
126 parsed[itemsKey][iKey].unlocked = true;
127 parsed[itemsKey][iKey].locked = false;
128 parsed[itemsKey][iKey].owned = true;
129 }
130 modified = true;
131 }
132 }
133
134 // Unlock skins
135 if (parsed.skins || parsed.Skins) {
136 console.log('[Veck.io Unlocker] Found skins data, unlocking all...');
137 let skinsKey = parsed.skins ? 'skins' : 'Skins';
138 if (Array.isArray(parsed[skinsKey])) {
139 parsed[skinsKey] = parsed[skinsKey].map(s => ({...s, unlocked: true, locked: false, owned: true}));
140 modified = true;
141 } else if (typeof parsed[skinsKey] === 'object') {
142 for (let sKey in parsed[skinsKey]) {
143 parsed[skinsKey][sKey].unlocked = true;
144 parsed[skinsKey][sKey].locked = false;
145 parsed[skinsKey][sKey].owned = true;
146 }
147 modified = true;
148 }
149 }
150
151 // Add unlimited currency
152 if (parsed.coins !== undefined) {
153 parsed.coins = 999999;
154 modified = true;
155 }
156 if (parsed.money !== undefined) {
157 parsed.money = 999999;
158 modified = true;
159 }
160 if (parsed.currency !== undefined) {
161 parsed.currency = 999999;
162 modified = true;
163 }
164 if (parsed.credits !== undefined) {
165 parsed.credits = 999999;
166 modified = true;
167 }
168
169 if (modified) {
170 data = JSON.stringify(parsed);
171 }
172 }
173 } catch (error) {
174 // Not JSON, continue with original value
175 }
176
177 return originalSetItem.call(this, key, data);
178 }
179 } catch (error) {
180 console.error('[Veck.io Unlocker] Error intercepting setItem:', error);
181 }
182
183 return originalSetItem.call(this, key, value);
184 };
185
186 // Override localStorage.getItem to return unlocked data
187 localStorage.getItem = function(key) {
188 // Force return unlocked values for specific keys
189 if (key === 'allItemsUnlocked' || key === 'rainbowItemsUnlocked') {
190 return 'true';
191 }
192
193 if (key === 'level' || key === 'Level' || key === 'LEVEL' ||
194 key === 'playerLevel' || key === 'currentLevel' || key === 'userLevel') {
195 return '100';
196 }
197
198 if (key === 'xp' || key === 'XP' || key === 'exp' || key === 'EXP' ||
199 key === 'experience' || key === 'playerXP') {
200 return '999999999';
201 }
202
203 if (key === 'coins' || key === 'Coins' || key === 'COINS' ||
204 key === 'veckCoins' || key === 'money' || key === 'currency' || key === 'credits') {
205 return '100000';
206 }
207
208 let value = originalGetItem.call(this, key);
209
210 if (!value) return value;
211
212 try {
213 let parsed = JSON.parse(value);
214
215 if (parsed && typeof parsed === 'object') {
216 let modified = false;
217
218 // Unlock weapons
219 if (parsed.weapons || parsed.Weapons) {
220 let weaponsKey = parsed.weapons ? 'weapons' : 'Weapons';
221 if (Array.isArray(parsed[weaponsKey])) {
222 parsed[weaponsKey] = parsed[weaponsKey].map(w => ({...w, unlocked: true, locked: false, owned: true}));
223 modified = true;
224 } else if (typeof parsed[weaponsKey] === 'object') {
225 for (let wKey in parsed[weaponsKey]) {
226 parsed[weaponsKey][wKey].unlocked = true;
227 parsed[weaponsKey][wKey].locked = false;
228 parsed[weaponsKey][wKey].owned = true;
229 }
230 modified = true;
231 }
232 }
233
234 // Unlock items
235 if (parsed.items || parsed.Items) {
236 let itemsKey = parsed.items ? 'items' : 'Items';
237 if (Array.isArray(parsed[itemsKey])) {
238 parsed[itemsKey] = parsed[itemsKey].map(i => ({...i, unlocked: true, locked: false, owned: true}));
239 modified = true;
240 } else if (typeof parsed[itemsKey] === 'object') {
241 for (let iKey in parsed[itemsKey]) {
242 parsed[itemsKey][iKey].unlocked = true;
243 parsed[itemsKey][iKey].locked = false;
244 parsed[itemsKey][iKey].owned = true;
245 }
246 modified = true;
247 }
248 }
249
250 // Unlock skins
251 if (parsed.skins || parsed.Skins) {
252 let skinsKey = parsed.skins ? 'skins' : 'Skins';
253 if (Array.isArray(parsed[skinsKey])) {
254 parsed[skinsKey] = parsed[skinsKey].map(s => ({...s, unlocked: true, locked: false, owned: true}));
255 modified = true;
256 } else if (typeof parsed[skinsKey] === 'object') {
257 for (let sKey in parsed[skinsKey]) {
258 parsed[skinsKey][sKey].unlocked = true;
259 parsed[skinsKey][sKey].locked = false;
260 parsed[skinsKey][sKey].owned = true;
261 }
262 modified = true;
263 }
264 }
265
266 // Add unlimited currency
267 if (parsed.coins !== undefined) {
268 parsed.coins = 999999;
269 modified = true;
270 }
271 if (parsed.money !== undefined) {
272 parsed.money = 999999;
273 modified = true;
274 }
275 if (parsed.currency !== undefined) {
276 parsed.currency = 999999;
277 modified = true;
278 }
279 if (parsed.credits !== undefined) {
280 parsed.credits = 999999;
281 modified = true;
282 }
283
284 if (modified) {
285 return JSON.stringify(parsed);
286 }
287 }
288 } catch (error) {
289 // Not JSON, return original
290 }
291
292 return value;
293 };
294
295 // Intercept IndexedDB for Unity games
296 const originalIDBOpen = indexedDB.open;
297 indexedDB.open = function(...args) {
298 const request = originalIDBOpen.apply(this, args);
299
300 request.addEventListener('success', function() {
301 console.log('[Veck.io Unlocker] IndexedDB opened:', args[0]);
302
303 const db = request.result;
304
305 // Try to read and modify game data
306 try {
307 const storeNames = Array.from(db.objectStoreNames);
308 console.log('[Veck.io Unlocker] Object stores:', storeNames);
309
310 storeNames.forEach(storeName => {
311 try {
312 const transaction = db.transaction(storeName, 'readwrite');
313 const store = transaction.objectStore(storeName);
314 const getAllRequest = store.getAll();
315
316 getAllRequest.onsuccess = function() {
317 const data = getAllRequest.result;
318 console.log(`[Veck.io Unlocker] Data from ${storeName}:`, data);
319
320 // Modify and put back
321 if (Array.isArray(data)) {
322 data.forEach((item, index) => {
323 if (item && typeof item === 'object') {
324 if (item.unlocked !== undefined) item.unlocked = true;
325 if (item.locked !== undefined) item.locked = false;
326 if (item.owned !== undefined) item.owned = true;
327
328 try {
329 store.put(item, index);
330 } catch (e) {
331 console.log('[Veck.io Unlocker] Could not modify item:', e);
332 }
333 }
334 });
335 }
336 };
337 } catch (e) {
338 console.log('[Veck.io Unlocker] Error accessing store:', e);
339 }
340 });
341 } catch (e) {
342 console.error('[Veck.io Unlocker] Error modifying IndexedDB:', e);
343 }
344 });
345
346 return request;
347 };
348
349 // Monitor for Unity game objects and window properties
350 let checkInterval = setInterval(() => {
351 // Check for Unity instance
352 if (typeof unsafeWindow.unityInstance !== 'undefined') {
353 console.log('[Veck.io Unlocker] Unity instance found!');
354
355 // Try to send messages to Unity
356 try {
357 unsafeWindow.unityInstance.SendMessage('GameManager', 'UnlockAll', '');
358 } catch (e) {
359 console.log('[Veck.io Unlocker] Could not send Unity message:', e);
360 }
361 }
362
363 // Check for game objects in window
364 for (let key in unsafeWindow) {
365 if (key.toLowerCase().includes('game') || key.toLowerCase().includes('player')) {
366 try {
367 let obj = unsafeWindow[key];
368 if (obj && typeof obj === 'object') {
369 // Try to unlock items
370 if (obj.weapons) {
371 console.log('[Veck.io Unlocker] Found weapons in', key);
372 if (Array.isArray(obj.weapons)) {
373 obj.weapons.forEach(w => {
374 if (w) {
375 w.unlocked = true;
376 w.locked = false;
377 w.owned = true;
378 }
379 });
380 }
381 }
382 if (obj.items) {
383 console.log('[Veck.io Unlocker] Found items in', key);
384 if (Array.isArray(obj.items)) {
385 obj.items.forEach(i => {
386 if (i) {
387 i.unlocked = true;
388 i.locked = false;
389 i.owned = true;
390 }
391 });
392 }
393 }
394 }
395 } catch (error) {
396 // Skip
397 }
398 }
399 }
400 }, 2000);
401
402 // Stop checking after 30 seconds
403 setTimeout(() => {
404 clearInterval(checkInterval);
405 console.log('[Veck.io Unlocker] Stopped monitoring for game objects');
406 }, 30000);
407
408 console.log('[Veck.io Unlocker] ✓ All hooks installed!');
409 console.log('[Veck.io Unlocker] ✓ All weapons unlocked!');
410 console.log('[Veck.io Unlocker] ✓ All items unlocked!');
411 console.log('[Veck.io Unlocker] ✓ Rainbow items unlocked!');
412 console.log('[Veck.io Unlocker] ✓ Overpowered weapons unlocked!');
413 console.log('[Veck.io Unlocker] ✓ Level set to 100!');
414 console.log('[Veck.io Unlocker] ✓ XP set to maximum!');
415})();