Size
13.8 KB
Version
1.0
Created
Jan 28, 2026
Updated
6 days ago
1// ==UserScript==
2// @license MIT
3// @name PhotonGT's Prodigy Cheat
4// @namespace http://tampermonkey.net/
5// @version 1.0
6// @description Prodigy Math cheat menu
7// @author PhotonGT
8// @match *://*.prodigygame.com/*
9// @icon https://www.google.com/s2/favicons?sz=64&domain=prodigygame.com
10// @grant none
11// @run-at document-end
12// @downloadURL https://update.greasyfork.org/scripts/540784/PhotonGT%27s%20Prodigy%20Cheat.user.js
13// @updateURL https://update.greasyfork.org/scripts/540784/PhotonGT%27s%20Prodigy%20Cheat.meta.js
14// ==/UserScript==
15
16(function() {
17 'use strict';
18
19 const currentURL = window.location.href;
20 if (!currentURL.startsWith("https://math.prodigygame.com/?launcher=true&code=")) return;
21
22 // --- Menu Setup ---
23 const menu = document.createElement('div');
24 menu.style.position = 'fixed';
25 menu.style.top = '10px';
26 menu.style.right = '10px';
27 menu.style.background = 'rgba(0,0,0,0.8)';
28 menu.style.color = '#fff';
29 menu.style.padding = '10px';
30 menu.style.borderRadius = '8px';
31 menu.style.fontFamily = 'monospace';
32 menu.style.zIndex = 9999;
33 menu.style.width = '280px';
34 menu.style.userSelect = 'none';
35 menu.style.boxShadow = '0 0 10px #0ff';
36 menu.tabIndex = 0; // allow input focus & backspace
37
38 // Title (drag handle)
39 const title = document.createElement('div');
40 title.textContent = 'Prodigy Cheat Menu';
41 title.style.fontWeight = 'bold';
42 title.style.marginBottom = '8px';
43 title.style.cursor = 'move';
44 menu.appendChild(title);
45
46 // --- Gold input ---
47 const goldLabel = document.createElement('label');
48 goldLabel.textContent = 'Gold Amount: ';
49 goldLabel.htmlFor = 'goldInput';
50 menu.appendChild(goldLabel);
51
52 const goldInput = document.createElement('input');
53 goldInput.type = 'text';
54 goldInput.id = 'goldInput';
55 goldInput.placeholder = 'e.g. 1000000';
56 goldInput.style.width = '100%';
57 goldInput.style.margin = '4px 0 10px';
58 goldInput.style.padding = '4px';
59 goldInput.style.borderRadius = '4px';
60 goldInput.style.border = 'none';
61 goldInput.style.fontSize = '14px';
62 menu.appendChild(goldInput);
63
64 const goldBtn = document.createElement('button');
65 goldBtn.textContent = 'Set Gold';
66 goldBtn.style.width = '100%';
67 goldBtn.style.padding = '6px';
68 goldBtn.style.border = 'none';
69 goldBtn.style.borderRadius = '4px';
70 goldBtn.style.backgroundColor = '#0ff';
71 goldBtn.style.color = '#000';
72 goldBtn.style.fontWeight = 'bold';
73 goldBtn.style.cursor = 'pointer';
74 goldBtn.onmouseover = () => goldBtn.style.backgroundColor = '#0cc';
75 goldBtn.onmouseout = () => goldBtn.style.backgroundColor = '#0ff';
76 menu.appendChild(goldBtn);
77
78 goldBtn.onclick = () => {
79 const raw = goldInput.value.replace(/,/g, '').trim();
80 const amt = parseInt(raw);
81 if (!isNaN(amt) && isFinite(amt)) {
82 const gold = Math.min(amt, 10000000);
83 if (typeof Boot !== 'undefined' &&
84 Boot.prototype.game &&
85 Boot.prototype.game._state &&
86 Boot.prototype.game._state._current &&
87 Boot.prototype.game._state._current.user &&
88 Boot.prototype.game._state._current.user.source &&
89 Boot.prototype.game._state._current.user.source.data) {
90 Boot.prototype.game._state._current.user.source.data.gold = gold;
91 Boot.prototype.game._state._current.user.source.addWin();
92 alert(`Gold set to ${gold}!`);
93 } else {
94 alert('Game not ready yet, wait a sec.');
95 }
96 } else {
97 alert('Put a valid number for gold, fam.');
98 }
99 };
100
101 // --- WalkSpeed input ---
102 const speedLabel = document.createElement('label');
103 speedLabel.textContent = 'Walk Speed: ';
104 speedLabel.htmlFor = 'speedInput';
105 speedLabel.style.marginTop = '15px';
106 menu.appendChild(speedLabel);
107
108 const speedInput = document.createElement('input');
109 speedInput.type = 'text';
110 speedInput.id = 'speedInput';
111 speedInput.placeholder = 'e.g. 1.5';
112 speedInput.style.width = '100%';
113 speedInput.style.margin = '4px 0 10px';
114 speedInput.style.padding = '4px';
115 speedInput.style.borderRadius = '4px';
116 speedInput.style.border = 'none';
117 speedInput.style.fontSize = '14px';
118 menu.appendChild(speedInput);
119
120 const speedBtn = document.createElement('button');
121 speedBtn.textContent = 'Set Walk Speed';
122 speedBtn.style.width = '100%';
123 speedBtn.style.padding = '6px';
124 speedBtn.style.border = 'none';
125 speedBtn.style.borderRadius = '4px';
126 speedBtn.style.backgroundColor = '#0ff';
127 speedBtn.style.color = '#000';
128 speedBtn.style.fontWeight = 'bold';
129 speedBtn.style.cursor = 'pointer';
130 speedBtn.onmouseover = () => speedBtn.style.backgroundColor = '#0cc';
131 speedBtn.onmouseout = () => speedBtn.style.backgroundColor = '#0ff';
132 menu.appendChild(speedBtn);
133
134 speedBtn.onclick = () => {
135 const val = parseFloat(speedInput.value.trim());
136 if (!isNaN(val) && isFinite(val)) {
137 if (typeof Boot !== 'undefined' &&
138 Boot.prototype.game &&
139 Boot.prototype.game._state &&
140 Boot.prototype.game._state._current &&
141 Boot.prototype.game._state._current.user) {
142 Boot.prototype.game._state._current.user.walkSpeed = val;
143 alert(`Walk Speed set to ${val}!`);
144 } else {
145 alert('Game not ready yet, wait a sec.');
146 }
147 } else {
148 alert('Put a valid number for walk speed, bro.');
149 }
150 };
151
152 // --- Unlock weapons & currency ---
153 function unlockWeapons(currencyAmount = 9999, weaponAmount = 99) {
154 function buildUnlockList(items, count = weaponAmount) {
155 let e = [];
156 items.forEach(i => e.push(`{"N":"${count}","ID":${i.ID}}`));
157 return '[' + e.join(',') + ']';
158 }
159
160 try {
161 const gameData = Boot.prototype.game._state._states.get("Boot")._gameData;
162 const backpack = Boot.prototype.game._state._current.user.source.backpack;
163
164 backpack.data.weapon = JSON.parse(buildUnlockList(gameData.weapon));
165 backpack.data.item = JSON.parse(buildUnlockList(gameData.item));
166 backpack.data.outfit = JSON.parse(buildUnlockList(gameData.outfit));
167 backpack.data.relic = JSON.parse(buildUnlockList(gameData.relic));
168 backpack.data.boots = JSON.parse(buildUnlockList(gameData.boots));
169 backpack.data.hat = JSON.parse(buildUnlockList(gameData.hat));
170 backpack.data.currency = JSON.parse(buildUnlockList(gameData.currency, currencyAmount));
171 backpack.data.fossil = JSON.parse(buildUnlockList(gameData.fossil));
172 backpack.data.follow = JSON.parse(buildUnlockList(gameData.follow));
173 backpack.data.mount = JSON.parse(buildUnlockList(gameData.mount));
174 backpack.data.key = JSON.parse(buildUnlockList(gameData.key));
175 backpack.data.spellRelic = JSON.parse(buildUnlockList(gameData.spellRelic));
176
177 Boot.prototype.game._state._current.user.source.house.data.items = {};
178 let fillObj = { A: [], N: weaponAmount };
179 gameData.dorm.forEach(dormItem => {
180 Boot.prototype.game._state._current.user.source.house.data.items[dormItem.ID] = fillObj;
181 });
182
183 alert(`Unlocked all weapons/items to ${weaponAmount} and currency to ${currencyAmount}!`);
184 } catch (e) {
185 alert('Failed to unlock weapons, try again after game loads fully.');
186 console.error(e);
187 }
188 }
189
190 const unlockLabel = document.createElement('label');
191 unlockLabel.textContent = 'Unlock Amount: ';
192 unlockLabel.style.marginTop = '15px';
193 menu.appendChild(unlockLabel);
194
195 const unlockInput = document.createElement('input');
196 unlockInput.type = 'text';
197 unlockInput.id = 'unlockInput';
198 unlockInput.placeholder = 'Weapons (default 99)';
199 unlockInput.style.width = '100%';
200 unlockInput.style.margin = '4px 0 5px';
201 unlockInput.style.padding = '4px';
202 unlockInput.style.borderRadius = '4px';
203 unlockInput.style.border = 'none';
204 unlockInput.style.fontSize = '14px';
205 menu.appendChild(unlockInput);
206
207 const currencyInput = document.createElement('input');
208 currencyInput.type = 'text';
209 currencyInput.id = 'currencyInput';
210 currencyInput.placeholder = 'Currency (default 9999)';
211 currencyInput.style.width = '100%';
212 currencyInput.style.margin = '0 0 10px';
213 currencyInput.style.padding = '4px';
214 currencyInput.style.borderRadius = '4px';
215 currencyInput.style.border = 'none';
216 currencyInput.style.fontSize = '14px';
217 menu.appendChild(currencyInput);
218
219 const unlockBtn = document.createElement('button');
220 unlockBtn.textContent = 'Unlock Weapons & Currency';
221 unlockBtn.style.width = '100%';
222 unlockBtn.style.padding = '6px';
223 unlockBtn.style.border = 'none';
224 unlockBtn.style.borderRadius = '4px';
225 unlockBtn.style.backgroundColor = '#0ff';
226 unlockBtn.style.color = '#000';
227 unlockBtn.style.fontWeight = 'bold';
228 unlockBtn.style.cursor = 'pointer';
229 unlockBtn.onmouseover = () => unlockBtn.style.backgroundColor = '#0cc';
230 unlockBtn.onmouseout = () => unlockBtn.style.backgroundColor = '#0ff';
231 menu.appendChild(unlockBtn);
232
233 unlockBtn.onclick = () => {
234 let weapons = parseInt(unlockInput.value.trim());
235 let currency = parseInt(currencyInput.value.trim());
236 if (isNaN(weapons)) weapons = 99;
237 if (isNaN(currency)) currency = 9999;
238 unlockWeapons(currency, weapons);
239 };
240
241 // --- Walk Anywhere hack ---
242 let walkAnywhereEnabled = false;
243 const walkAnywhereBtn = document.createElement('button');
244 walkAnywhereBtn.textContent = 'Toggle Walk Anywhere';
245 walkAnywhereBtn.style.width = '100%';
246 walkAnywhereBtn.style.padding = '6px';
247 walkAnywhereBtn.style.border = 'none';
248 walkAnywhereBtn.style.borderRadius = '4px';
249 walkAnywhereBtn.style.backgroundColor = '#0ff';
250 walkAnywhereBtn.style.color = '#000';
251 walkAnywhereBtn.style.fontWeight = 'bold';
252 walkAnywhereBtn.style.cursor = 'pointer';
253 walkAnywhereBtn.style.marginTop = '10px';
254
255 walkAnywhereBtn.onmouseover = () => walkAnywhereBtn.style.backgroundColor = '#0cc';
256 walkAnywhereBtn.onmouseout = () => walkAnywhereBtn.style.backgroundColor = '#0ff';
257
258 menu.appendChild(walkAnywhereBtn);
259
260 walkAnywhereBtn.onclick = () => {
261 try {
262 const area = Boot.prototype.game._state._current.area;
263 if (!walkAnywhereEnabled) {
264 for (let i = 0; i < area.length; i++) {
265 area[i] = Array(64).fill(1);
266 }
267 alert('Walk Anywhere ENABLED');
268 } else {
269 alert('Walk Anywhere DISABLED (reload to reset)');
270 }
271 walkAnywhereEnabled = !walkAnywhereEnabled;
272 } catch (e) {
273 alert('Failed to toggle Walk Anywhere, try after game fully loads.');
274 console.error(e);
275 }
276 };
277
278 // --- Pet unlocker ---
279 const petUnlockBtn = document.createElement('button');
280 petUnlockBtn.textContent = 'Unlock All Pets';
281 petUnlockBtn.style.width = '100%';
282 petUnlockBtn.style.padding = '6px';
283 petUnlockBtn.style.border = 'none';
284 petUnlockBtn.style.borderRadius = '4px';
285 petUnlockBtn.style.backgroundColor = '#0ff';
286 petUnlockBtn.style.color = '#000';
287 petUnlockBtn.style.fontWeight = 'bold';
288 petUnlockBtn.style.cursor = 'pointer';
289 petUnlockBtn.style.marginTop = '10px';
290
291 petUnlockBtn.onmouseover = () => petUnlockBtn.style.backgroundColor = '#0cc';
292 petUnlockBtn.onmouseout = () => petUnlockBtn.style.backgroundColor = '#0ff';
293
294 menu.appendChild(petUnlockBtn);
295
296 petUnlockBtn.onclick = async () => {
297 const user_id = Boot.prototype.game._state._current.user.source.userID;
298 const levelStr = prompt("Made by rxzyx (rzx). Unlocking all pets, what level do you want them to be?");
299 const level = parseInt(levelStr);
300 if (!level || level <= 0) {
301 alert("Unexpected Answer or invalid level");
302 return;
303 }
304 try {
305 const response = await fetch(`https://api.prodigygame.com/game-api/v1/character/${user_id}?userID=${user_id}`, {
306 method: "GET",
307 headers: {
308 "Content-Type": "application/json",
309 "authorization": sessionStorage.getItem("JWT_TOKEN")
310 }
311 });
312 const charData = await response.json();
313
314 function buildPetsData(includeDetails = true) {
315 const petsData = [];
316 Boot.prototype.game._state._states.get("Boot")._gameData.pet.forEach(pet => {
317 if (includeDetails) {
318 petsData.push(JSON.stringify({
319 levelCaught: charData.data.level,
320 ID: pet.ID,
321 stars: 99999,
322 catchDate: Date.now(),
323 level: level,
324 foreignSpells: [61, 67, 55, 58, 70, 81, 75, 78]
325 }));
326 } else {
327 petsData.push(JSON.stringify({
328 firstSeenDate: Date.now(),
329 ID: pet.ID,
330 timesBattled: 1,
331 timesRescued: 1
332 }));
333 }
334 });
335 return `[${petsData.join(",")}]`;
336 }
337
338 charData.pets = JSON.parse(buildPetsData(true));
339 charData.encounters.pets = JSON.parse(buildPetsData(false));
340
341 await fetch(`https://api.prodigygame.com/game-api/v3/characters/${user_id}`, {
342 method: "POST",
343 headers: {
344 "Content-Type": "application/json",
345 "authorization": sessionStorage.getItem("JWT_TOKEN"),
346 "Accept": "application/json"
347 },
348 body: JSON.stringify({
349 data: JSON.stringify(charData),
350 userID: user_id
351 })
352 });
353
354 alert("Pets unlocked! You will need to login again.");
355 window.location.reload();
356
357 } catch (e) {
358 alert("Failed to unlock pets, try again later.");
359 console.error(e);
360 }
361 };
362
363 // --- Append menu ---
364 document.body.appendChild(menu);
365
366 // --- Dragging functionality ---
367 let dragging = false, offsetX, offsetY;
368 title.addEventListener('mousedown', e => {
369 dragging = true;
370 offsetX = e.clientX - menu.getBoundingClientRect().left;
371 offsetY = e.clientY - menu.getBoundingClientRect().top;
372 menu.style.transition = 'none';
373 });
374 window.addEventListener('mouseup', () => dragging = false);
375 window.addEventListener('mousemove', e => {
376 if (dragging) {
377 menu.style.left = (e.clientX - offsetX) + 'px';
378 menu.style.top = (e.clientY - offsetY) + 'px';
379 menu.style.right = 'auto';
380 menu.style.bottom = 'auto';
381 }
382 });
383
384})();
385