Fortnite Adaptive Aimbot v42.1

Adaptive Aimbot with customizable crosshair, sliders, and buttons for better control. ESP included.

  1. // ==UserScript==
  2. // @name Fortnite Adaptive Aimbot v42.1
  3. // @namespace http://tampermonkey.net/
  4. // @version 42.1
  5. // @description Adaptive Aimbot with customizable crosshair, sliders, and buttons for better control. ESP included.
  6. // @license MIT
  7. // @author MrTimTam
  8. // @match https://www.xbox.com/en-US/play/launch/fortnite/BT5P2X999VH2
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. const config = {
  16. enemySelector: '.enemy-class',
  17. playerSelector: '.PlayerInfo-module__container___ROgVL',
  18. aimInterval: 100,
  19. fov: 90,
  20. fovRadius: 150,
  21. fovEnabled: true,
  22. enableSilentAim: true,
  23. enableNormalAim: false,
  24. autoShoot: true,
  25. visibleCheck: true,
  26. distanceLimit: 2000,
  27. hitbox: 'head', // Options: 'head', 'body', 'nearest'
  28. silentAimSpeed: 50.0,
  29. crosshair: {
  30. enabled: true,
  31. size: 15,
  32. color: 'red',
  33. style: 'circle', // Options: 'circle', 'dot', 'cross'
  34. outline: true,
  35. outlineWidth: 2,
  36. outlineColor: 'white',
  37. },
  38. debugMode: true,
  39. esp: {
  40. enabled: true,
  41. },
  42. };
  43.  
  44. // Debug Log
  45. function debugLog(message) {
  46. if (config.debugMode) {
  47. console.log(`[DEBUG] ${message}`);
  48. }
  49. }
  50.  
  51. debugLog('Initializing script...');
  52.  
  53. // GUI Setup
  54. const gui = document.createElement('div');
  55. gui.id = 'gui';
  56. gui.style.cssText = `
  57. position: fixed;
  58. top: 10px;
  59. left: 10px;
  60. background: rgba(0, 0, 0, 0.8);
  61. color: white;
  62. padding: 10px;
  63. border-radius: 10px;
  64. z-index: 1000;
  65. font-family: Arial, sans-serif;
  66. display: flex;
  67. flex-direction: column;
  68. `;
  69. document.body.appendChild(gui);
  70. debugLog('GUI added.');
  71.  
  72. // GUI Helpers
  73. function createButton(label, onClick) {
  74. const button = document.createElement('button');
  75. button.textContent = label;
  76. button.style.cssText = `
  77. margin: 5px 0;
  78. padding: 5px 10px;
  79. background: #007bff;
  80. color: white;
  81. border: none;
  82. border-radius: 5px;
  83. cursor: pointer;
  84. `;
  85. button.addEventListener('click', onClick);
  86. gui.appendChild(button);
  87. }
  88.  
  89. function createSlider(label, min, max, step, defaultValue, onChange) {
  90. const container = document.createElement('div');
  91. container.style.marginBottom = '10px';
  92.  
  93. const sliderLabel = document.createElement('label');
  94. sliderLabel.textContent = `${label}: ${defaultValue}`;
  95. sliderLabel.style.color = 'white';
  96. sliderLabel.style.display = 'block';
  97.  
  98. const slider = document.createElement('input');
  99. slider.type = 'range';
  100. slider.min = min;
  101. slider.max = max;
  102. slider.step = step;
  103. slider.value = defaultValue;
  104. slider.style.width = '100%';
  105. slider.style.marginTop = '5px';
  106.  
  107. slider.addEventListener('input', () => {
  108. sliderLabel.textContent = `${label}: ${slider.value}`;
  109. onChange(slider.value);
  110. });
  111.  
  112. container.appendChild(sliderLabel);
  113. container.appendChild(slider);
  114. gui.appendChild(container);
  115. }
  116.  
  117. // Add Buttons
  118. createButton('Toggle Silent Aim', () => {
  119. config.enableSilentAim = !config.enableSilentAim;
  120. debugLog(`Silent Aim toggled: ${config.enableSilentAim}`);
  121. });
  122.  
  123. createButton('Toggle Normal Aim', () => {
  124. config.enableNormalAim = !config.enableNormalAim;
  125. debugLog(`Normal Aim toggled: ${config.enableNormalAim}`);
  126. });
  127.  
  128. createButton('Toggle Auto Shoot', () => {
  129. config.autoShoot = !config.autoShoot;
  130. debugLog(`Auto Shoot toggled: ${config.autoShoot}`);
  131. });
  132.  
  133. createButton('Toggle FOV Display', () => {
  134. config.fovEnabled = !config.fovEnabled;
  135. updateFovCircle();
  136. debugLog(`FOV Display toggled: ${config.fovEnabled}`);
  137. });
  138.  
  139. createButton('Toggle ESP', () => {
  140. config.esp.enabled = !config.esp.enabled;
  141. updateESP();
  142. debugLog(`ESP toggled: ${config.esp.enabled}`);
  143. });
  144.  
  145. createButton('Reset Settings', () => {
  146. Object.assign(config, {
  147. fovRadius: 150,
  148. silentAimSpeed: 50.0,
  149. crosshair: {
  150. size: 15,
  151. outline: true,
  152. outlineWidth: 2,
  153. },
  154. });
  155. updateCrosshair();
  156. updateFovCircle();
  157. updateESP();
  158. debugLog('Settings reset to default.');
  159. });
  160.  
  161. // Add Sliders
  162. createSlider('FOV Radius', 50, 300, 10, config.fovRadius, (value) => {
  163. config.fovRadius = parseInt(value, 10);
  164. updateFovCircle();
  165. });
  166.  
  167. createSlider('Silent Aim Speed', 0.1, 100.0, 0.1, config.silentAimSpeed, (value) => {
  168. config.silentAimSpeed = parseFloat(value);
  169. });
  170.  
  171. createSlider('Crosshair Size', 5, 30, 1, config.crosshair.size, (value) => {
  172. config.crosshair.size = parseInt(value, 10);
  173. updateCrosshair();
  174. });
  175.  
  176. // Crosshair
  177. function createCrosshair() {
  178. const canvas = document.createElement('canvas');
  179. canvas.id = 'custom-crosshair';
  180. canvas.style.cssText = `
  181. position: fixed;
  182. top: 0;
  183. left: 0;
  184. width: 100%;
  185. height: 100%;
  186. pointer-events: none;
  187. z-index: 10000;
  188. `;
  189. document.body.appendChild(canvas);
  190.  
  191. const ctx = canvas.getContext('2d');
  192.  
  193. function drawCrosshair() {
  194. ctx.clearRect(0, 0, canvas.width, canvas.height);
  195. const centerX = window.innerWidth / 2;
  196. const centerY = window.innerHeight / 2;
  197.  
  198. ctx.strokeStyle = config.crosshair.color;
  199. ctx.lineWidth = config.crosshair.outline ? config.crosshair.outlineWidth : 1;
  200.  
  201. switch (config.crosshair.style) {
  202. case 'circle':
  203. ctx.beginPath();
  204. ctx.arc(centerX, centerY, config.crosshair.size / 2, 0, Math.PI * 2);
  205. ctx.stroke();
  206. break;
  207. case 'dot':
  208. ctx.beginPath();
  209. ctx.arc(centerX, centerY, config.crosshair.size / 2, 0, Math.PI * 2);
  210. ctx.fill();
  211. break;
  212. case 'cross':
  213. ctx.beginPath();
  214. ctx.moveTo(centerX - config.crosshair.size, centerY);
  215. ctx.lineTo(centerX + config.crosshair.size, centerY);
  216. ctx.moveTo(centerX, centerY - config.crosshair.size);
  217. ctx.lineTo(centerX, centerY + config.crosshair.size);
  218. ctx.stroke();
  219. break;
  220. }
  221. }
  222.  
  223. window.addEventListener('resize', () => {
  224. canvas.width = window.innerWidth;
  225. canvas.height = window.innerHeight;
  226. });
  227.  
  228. setInterval(drawCrosshair, 16);
  229. }
  230.  
  231. createCrosshair();
  232.  
  233. // FOV Circle
  234. function createFovCircle() {
  235. const circle = document.createElement('div');
  236. circle.id = 'fov-circle';
  237. circle.style.cssText = `
  238. position: fixed;
  239. top: 50%;
  240. left: 50%;
  241. width: ${config.fovRadius * 2}px;
  242. height: ${config.fovRadius * 2}px;
  243. border-radius: 50%;
  244. border: ${config.crosshair.outlineWidth}px solid ${config.crosshair.outlineColor};
  245. pointer-events: none;
  246. transform: translate(-50%, -50%);
  247. display: ${config.fovEnabled ? 'block' : 'none'};
  248. opacity: 0.5;
  249. z-index: 999;
  250. `;
  251. document.body.appendChild(circle);
  252. }
  253.  
  254. function updateFovCircle() {
  255. const circle = document.getElementById('fov-circle');
  256. if (circle) {
  257. circle.style.width = `${config.fovRadius * 2}px`;
  258. circle.style.height = `${config.fovRadius * 2}px`;
  259. circle.style.display = config.fovEnabled ? 'block' : 'none';
  260. }
  261. }
  262.  
  263. createFovCircle();
  264.  
  265. // ESP
  266. function createESP() {
  267. const espContainer = document.createElement('div');
  268. espContainer.id = 'esp-container';
  269. espContainer.style.cssText = `
  270. position: fixed;
  271. top: 0;
  272. left: 0;
  273. width: 100%;
  274. height: 100%;
  275. pointer-events: none;
  276. z-index: 1000;
  277. `;
  278. document.body.appendChild(espContainer);
  279. }
  280.  
  281. function updateESP() {
  282. const espContainer = document.getElementById('esp-container');
  283. if (espContainer) {
  284. espContainer.style.display = config.esp.enabled ? 'block' : 'none';
  285. }
  286. }
  287.  
  288. createESP();
  289.  
  290. // Player Detection
  291. function detectPlayers() {
  292. const players = document.querySelectorAll(config.playerSelector);
  293. return Array.from(players).map((player) => {
  294. const rect = player.getBoundingClientRect();
  295. return {
  296. x: rect.left + rect.width / 2,
  297. y: rect.top + rect.height / 2,
  298. width: rect.width,
  299. height: rect.height,
  300. };
  301. });
  302. }
  303.  
  304. // Get the player under the crosshair
  305. function getPlayerUnderCrosshair() {
  306. const players = detectPlayers();
  307. const centerX = window.innerWidth / 2;
  308. const centerY = window.innerHeight / 2;
  309. const closestPlayer = players.reduce((closest, current) => {
  310. const distance = Math.hypot(current.x - centerX, current.y - centerY);
  311. if (distance < closest.distance) {
  312. return { player: current, distance };
  313. }
  314. return closest;
  315. }, { player: null, distance: Infinity });
  316. return closestPlayer.player;
  317. }
  318.  
  319. // Main loop
  320. setInterval(() => {
  321. // Silent Aim
  322. if (config.enableSilentAim) {
  323. const players = detectPlayers();
  324. if (players.length > 0) {
  325. let targetPlayer = null;
  326. const playerUnderCrosshair = getPlayerUnderCrosshair();
  327. if (playerUnderCrosshair) {
  328. targetPlayer = playerUnderCrosshair;
  329. } else {
  330. targetPlayer = players.reduce((closest, current) => {
  331. const distance = Math.hypot(current.x - window.innerWidth / 2, current.y - window.innerHeight / 2);
  332. if (distance < closest.distance) {
  333. return { player: current, distance };
  334. }
  335. return closest;
  336. }, { player: null, distance: Infinity }).player;
  337. }
  338. if (targetPlayer) {
  339. const aimX = targetPlayer.x;
  340. const aimY = targetPlayer.y;
  341. // Move the crosshair to the aim position
  342. const crosshair = document.getElementById('custom-crosshair');
  343. const ctx = crosshair.getContext('2d');
  344. ctx.clearRect(0, 0, crosshair.width, crosshair.height);
  345. ctx.beginPath();
  346. ctx.arc(aimX, aimY, config.crosshair.size / 2, 0, Math.PI * 2);
  347. ctx.stroke();
  348. // Simulate mouse movement
  349. const event = new MouseEvent('mousemove', {
  350. clientX: aimX,
  351. clientY: aimY,
  352. });
  353. document.dispatchEvent(event);
  354. }
  355. }
  356. }
  357.  
  358. // Normal Aim
  359. if (config.enableNormalAim) {
  360. const players = detectPlayers();
  361. if (players.length > 0) {
  362. let targetPlayer = null;
  363. const playerUnderCrosshair = getPlayerUnderCrosshair();
  364. if (playerUnderCrosshair) {
  365. targetPlayer = playerUnderCrosshair;
  366. } else {
  367. targetPlayer = players.reduce((closest, current) => {
  368. const distance = Math.hypot(current.x - window.innerWidth / 2, current.y - window.innerHeight / 2);
  369. if (distance < closest.distance) {
  370. return { player: current, distance };
  371. }
  372. return closest;
  373. }, { player: null, distance: Infinity }).player;
  374. }
  375. if (targetPlayer) {
  376. const aimX = targetPlayer.x;
  377. const aimY = targetPlayer.y;
  378. // Move the mouse to the aim position
  379. const event = new MouseEvent('mousemove', {
  380. clientX: aimX,
  381. clientY: aimY,
  382. });
  383. document.dispatchEvent(event);
  384. }
  385. }
  386. }
  387.  
  388. // Auto Shoot
  389. if (config.autoShoot) {
  390. const players = detectPlayers();
  391. if (players.length > 0) {
  392. let targetPlayer = null;
  393. const playerUnderCrosshair = getPlayerUnderCrosshair();
  394. if (playerUnderCrosshair) {
  395. targetPlayer = playerUnderCrosshair;
  396. } else {
  397. targetPlayer = players.reduce((closest, current) => {
  398. const distance = Math.hypot(current.x - window.innerWidth / 2, current.y - window.innerHeight / 2);
  399. if (distance < closest.distance) {
  400. return { player: current, distance };
  401. }
  402. return closest;
  403. }, { player: null, distance: Infinity }).player;
  404. }
  405. if (targetPlayer) {
  406. const aimX = targetPlayer.x;
  407. const aimY = targetPlayer.y;
  408. // Check if the player is within the FOV
  409. const fovRadius = config.fovRadius;
  410. const distance = Math.hypot(aimX - window.innerWidth / 2, aimY - window.innerHeight / 2);
  411. if (distance <= fovRadius) {
  412. // Simulate mouse click
  413. const event = new MouseEvent('click', {
  414. clientX: aimX,
  415. clientY: aimY,
  416. button: 0,
  417. buttons: 1,
  418. });
  419. document.dispatchEvent(event);
  420. // Simulate key press (for Xbox cloud gaming)
  421. const keyEvent = new KeyboardEvent('keydown', {
  422. key: ' ',
  423. keyCode: 32,
  424. code: 'Space',
  425. which: 32,
  426. bubbles: true,
  427. cancelable: true,
  428. });
  429. document.dispatchEvent(keyEvent);
  430. setTimeout(() => {
  431. const keyUpEvent = new KeyboardEvent('keyup', {
  432. key: ' ',
  433. keyCode: 32,
  434. code: 'Space',
  435. which: 32,
  436. bubbles: true,
  437. cancelable: true,
  438. });
  439. document.dispatchEvent(keyUpEvent);
  440. }, 100);
  441. }
  442. }
  443. }
  444. }
  445.  
  446. // ESP
  447. if (config.esp.enabled) {
  448. const players = detectPlayers();
  449. const espContainer = document.getElementById('esp-container');
  450. if (espContainer) {
  451. espContainer.innerHTML = '';
  452. players.forEach((player) => {
  453. const rect = player;
  454. const espBox = document.createElement('div');
  455. espBox.style.cssText = `
  456. position: absolute;
  457. top: ${rect.y}px;
  458. left: ${rect.x}px;
  459. width: ${rect.width}px;
  460. height: ${rect.height}px;
  461. border: 2px solid red;
  462. pointer-events: none;
  463. `;
  464. espContainer.appendChild(espBox);
  465. });
  466. }
  467. }
  468. }, config.aimInterval);
  469.  
  470. // Add a new keyboard shortcut to toggle the GUI
  471. document.addEventListener('keydown', (event) => {
  472. if (event.key === 'ArrowRight') {
  473. const guiElement = document.getElementById('gui');
  474. if (guiElement) {
  475. guiElement.style.display = guiElement.style.display === 'none' ? 'block' : 'none';
  476. }
  477. }
  478. });
  479. })();