GarticFlix V1 Elite

Ultimate Gartic Experience

  1. // ==UserScript==
  2. // @name GarticFlix V1 Elite
  3. // @namespace http://tampermonkey.net/
  4. // @version v.11.0
  5. // @description Ultimate Gartic Experience
  6. // @author Akíra & ygn
  7. // @match https://gartic.io/*
  8. // @icon https://www.google.com/s2/favicons?domain=gartic.io
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. if (window.location.href.indexOf("?L") !== -1) {
  13. const styles = `
  14. @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');
  15. :root {
  16. --bg-primary: #0f172a;
  17. --bg-secondary: #1e293b;
  18. --accent: #6366f1;
  19. --accent-hover: #4f46e5;
  20. --text: #e2e8f0;
  21. }
  22.  
  23. * {
  24. margin: 0;
  25. padding: 0;
  26. box-sizing: border-box;
  27. font-family: 'Outfit', sans-serif;
  28. }
  29.  
  30. @keyframes fadeIn {
  31. from { opacity: 0; transform: translateY(20px); }
  32. to { opacity: 1; transform: translateY(0); }
  33. }
  34.  
  35. @keyframes shimmer {
  36. 0% { background-position: -1000px 0; }
  37. 100% { background-position: 1000px 0; }
  38. }
  39.  
  40. @keyframes float {
  41. 0% { transform: translateY(0px); }
  42. 50% { transform: translateY(-10px); }
  43. 100% { transform: translateY(0px); }
  44. }
  45.  
  46. .container {
  47. position: fixed;
  48. top: 0;
  49. left: 0;
  50. width: 100%;
  51. height: 100vh;
  52. background: var(--bg-primary);
  53. color: var(--text);
  54. overflow-y: auto;
  55. z-index: 9999;
  56. padding: 20px;
  57. }
  58.  
  59. .header {
  60. background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  61. padding: 20px;
  62. border-radius: 15px;
  63. text-align: center;
  64. margin-bottom: 20px;
  65. position: relative;
  66. overflow: hidden;
  67. animation: float 6s ease-in-out infinite;
  68. }
  69.  
  70. .header::before {
  71. content: '';
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. right: 0;
  76. bottom: 0;
  77. background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  78. animation: shimmer 2s infinite;
  79. }
  80.  
  81. .header h1 {
  82. font-size: 28px;
  83. font-weight: 700;
  84. color: white;
  85. text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  86. margin: 0;
  87. }
  88.  
  89. .controls {
  90. background: var(--bg-secondary);
  91. border-radius: 15px;
  92. padding: 20px;
  93. margin-bottom: 20px;
  94. display: grid;
  95. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  96. gap: 15px;
  97. animation: fadeIn 0.5s ease-out;
  98. }
  99.  
  100. .control-input {
  101. width: 100%;
  102. padding: 12px;
  103. background: rgba(255,255,255,0.1);
  104. border: 2px solid var(--accent);
  105. border-radius: 10px;
  106. color: var(--text);
  107. font-size: 16px;
  108. transition: all 0.3s ease;
  109. }
  110.  
  111. .control-input:focus {
  112. outline: none;
  113. border-color: var(--accent-hover);
  114. box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
  115. }
  116.  
  117. .stats {
  118. display: grid;
  119. grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  120. gap: 15px;
  121. margin-bottom: 20px;
  122. }
  123.  
  124. .stat-card {
  125. background: var(--bg-secondary);
  126. padding: 15px;
  127. border-radius: 10px;
  128. text-align: center;
  129. }
  130.  
  131. .stat-value {
  132. font-size: 24px;
  133. font-weight: 700;
  134. color: var(--accent);
  135. }
  136.  
  137. .stat-label {
  138. font-size: 14px;
  139. opacity: 0.8;
  140. margin-top: 5px;
  141. }
  142.  
  143. .rooms-grid {
  144. display: grid;
  145. grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  146. gap: 20px;
  147. animation: fadeIn 0.6s ease-out;
  148. }
  149.  
  150. .room-card {
  151. background: var(--bg-secondary);
  152. border-radius: 15px;
  153. padding: 20px;
  154. transition: all 0.3s ease;
  155. position: relative;
  156. overflow: hidden;
  157. }
  158.  
  159. .room-card:hover {
  160. transform: translateY(-5px);
  161. box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  162. }
  163.  
  164. .room-header {
  165. display: flex;
  166. justify-content: space-between;
  167. align-items: center;
  168. margin-bottom: 15px;
  169. padding-bottom: 10px;
  170. border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  171. }
  172.  
  173. .room-title {
  174. font-size: 18px;
  175. font-weight: 600;
  176. color: var(--accent);
  177. }
  178.  
  179. .room-stats {
  180. font-size: 14px;
  181. opacity: 0.8;
  182. }
  183.  
  184. .room-actions {
  185. display: flex;
  186. gap: 10px;
  187. }
  188.  
  189. .btn {
  190. padding: 10px 20px;
  191. border-radius: 8px;
  192. font-weight: 500;
  193. cursor: pointer;
  194. transition: all 0.3s ease;
  195. border: none;
  196. flex: 1;
  197. font-size: 14px;
  198. }
  199.  
  200. .btn-primary {
  201. background: var(--accent);
  202. color: white;
  203. }
  204.  
  205. .btn-primary:hover {
  206. background: var(--accent-hover);
  207. transform: translateY(-2px);
  208. }
  209.  
  210. .btn-secondary {
  211. background: transparent;
  212. border: 2px solid var(--accent);
  213. color: var(--accent);
  214. }
  215.  
  216. .btn-secondary:hover {
  217. background: var(--accent);
  218. color: white;
  219. }
  220.  
  221. .users-grid {
  222. display: none;
  223. grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  224. gap: 10px;
  225. margin-top: 15px;
  226. padding: 15px;
  227. background: rgba(0,0,0,0.2);
  228. border-radius: 10px;
  229. animation: fadeIn 0.3s ease-out;
  230. }
  231.  
  232. .user-avatar {
  233. width: 60px;
  234. height: 60px;
  235. border-radius: 50%;
  236. cursor: pointer;
  237. transition: all 0.3s ease;
  238. border: 2px solid var(--accent);
  239. }
  240.  
  241. .user-avatar:hover {
  242. transform: scale(1.1);
  243. border-color: var(--accent-hover);
  244. }
  245.  
  246. .nickname-tooltip {
  247. position: absolute;
  248. background: var(--accent);
  249. color: white;
  250. padding: 5px 10px;
  251. border-radius: 5px;
  252. font-size: 12px;
  253. z-index: 1000;
  254. pointer-events: none;
  255. opacity: 0;
  256. transition: opacity 0.3s ease;
  257. }
  258.  
  259. @media (max-width: 768px) {
  260. .controls {
  261. grid-template-columns: 1fr;
  262. }
  263. .rooms-grid {
  264. grid-template-columns: 1fr;
  265. }
  266. }
  267. `;
  268.  
  269. document.head.innerHTML = `<style>${styles}</style>`;
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292. const mainContainer = document.createElement("div");
  293. mainContainer.className = "container";
  294. mainContainer.innerHTML = `
  295. <div class="header">
  296. <h1>GarticFlix Elite</h1>
  297. </div>
  298.  
  299. <div class="stats">
  300. <div class="stat-card">
  301. <div class="stat-value" id="totalRooms">0</div>
  302. <div class="stat-label">Aktif Odalar</div>
  303. </div>
  304. <div class="stat-card">
  305. <div class="stat-value" id="totalPlayers">0</div>
  306. <div class="stat-label">Toplam Oyuncu</div>
  307. </div>
  308. <div class="stat-card">
  309. <div class="stat-value" id="onlineUsers">0</div>
  310. <div class="stat-label"evrimiçi</div>
  311. </div>
  312. </div>
  313.  
  314. <div class="controls">
  315. <input type="text" class="control-input" placeholder="Oda veya Oyuncu Ara..." onkeyup="window.filterRooms(this.value)">
  316. <select class="control-input theme-select" onchange="window.updateRooms()">
  317. <option value="">Tüm Temalar</option>
  318. <option value="1">Genel</option>
  319. <option value="28">Anime</option>
  320. <option value="30">Diğer</option>
  321. <option value="12">Oyunlar</option>
  322. <option value="24">Youtuber</option>
  323. <option value="11">LoL</option>
  324. <option value="2">Hayvanlar</option>
  325. <option value="31">Minecraft</option>
  326. <option value="4">Yiyecekler</option>
  327. <option value="9">Animasyon</option>
  328. <option value="35">Naruto</option>
  329. <option value="16">Bayraklar</option>
  330. <option value="10"arkılar</option>
  331. <option value="17">Futbol</option>
  332. <option value="26">Logo</option>
  333. <option value="5">Fiiller</option>
  334. <option value="33">FNAF</option>
  335. <option value="3">Nesneler</option>
  336. <option value="6"lkeler</option>
  337. <option value="7">Markalar</option>
  338. <option value="8">Filmler</option>
  339. </select>
  340.  
  341. <select class="control-input lang-select" onchange="window.updateRooms()">
  342. <option value="8">Türkçe</option>
  343. <option value="2">English</option>
  344. <option value="3">Español</option>
  345. <option value="1">Português</option>
  346. <option value="7">Русский</option>
  347. <option value="13">Tiếng Vit</option>
  348. <option value="15">日本語</option>
  349. <option value="20">한국어</option>
  350. <option value="23">Azərbaycanca</option>
  351. <option value="45">Bahasa Indonesia</option>
  352. <option value="11"eština</option>
  353. <option value="14">Deutsch</option>
  354. <option value="4">Français</option>
  355. <option value="6">Italiano</option>
  356. <option value="44">Magyar</option>
  357. <option value="18">Nederlands</option>
  358. <option value="10">Polski</option>
  359. <option value="58">Română</option>
  360. <option value="22">Slovenčina</option>
  361. <option value="21">български език</option>
  362. <option value="40">עברית</option>
  363. <option value="19">العربية</option>
  364. <option value="34">فارسی</option>
  365. <option value="12">ภาษาไทย</option>
  366. <option value="16">中文 (简化字)</option>
  367. <option value="9">中文 (臺灣)</option>
  368. <option value="17">中文 (香港)</option>
  369. </select>
  370. </div>
  371.  
  372. <div class="rooms-grid"></div>
  373. `;
  374.  
  375. document.body.appendChild(mainContainer);
  376.  
  377. let roomsData = [];
  378. let filteredRooms = [];
  379.  
  380. function createRoomCard(room) {
  381. const card = document.createElement('div');
  382. card.className = 'room-card';
  383. card.innerHTML = `
  384. <div class="room-header">
  385. <div class="room-title">#${room.code}</div>
  386. <div class="room-stats">${room.quant}/${room.max} Oyuncu</div>
  387. </div>
  388. <div class="room-actions">
  389. <button class="btn btn-primary" onclick="window.joinRoom('${room.code}')">Katıl</button>
  390. <button class="btn btn-secondary" onclick="window.watchRoom('${room.code}')"zle</button>
  391. <button class="btn btn-primary" onclick="window.showUsers('${room.code}')">Kullanıcılar</button>
  392. </div>
  393. <div class="users-grid" id="users-${room.code}"></div>
  394. `;
  395. return card;
  396. }
  397.  
  398. window.filterRooms = (query) => {
  399. query = query.toLowerCase();
  400. filteredRooms = roomsData.filter(room =>
  401. room.code.toLowerCase().includes(query) ||
  402. (room.players && room.players.some(player =>
  403. player.nick.toLowerCase().includes(query)
  404. ))
  405. );
  406. updateRoomsDisplay();
  407. };
  408.  
  409. window.updateRooms = () => {
  410. const theme = document.querySelector('.theme-select').value;
  411. const lang = document.querySelector('.lang-select').value;
  412. let url = `https://gartic.io/req/list?language[]=${lang}`;
  413. if (theme) url += `&subject[]=${theme}`;
  414.  
  415. fetch(url)
  416. .then(response => response.json())
  417. .then(data => {
  418. roomsData = data;
  419. filteredRooms = data;
  420. updateRoomsDisplay();
  421. updateStats();
  422. });
  423. };
  424.  
  425. function updateStats() {
  426. document.getElementById('totalRooms').textContent = roomsData.length;
  427. const totalPlayers = roomsData.reduce((acc, room) => acc + room.quant, 0);
  428. document.getElementById('totalPlayers').textContent = totalPlayers;
  429. document.getElementById('onlineUsers').textContent = totalPlayers + Math.floor(Math.random() * 100);
  430. }
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446. function updateRoomsDisplay() {
  447. const container = document.querySelector('.rooms-grid');
  448. container.innerHTML = '';
  449. filteredRooms.forEach(room => {
  450. container.appendChild(createRoomCard(room));
  451. });
  452. }
  453.  
  454. window.joinRoom = (code) => {
  455. window.open(`https://gartic.io/${code}`, '_blank');
  456. };
  457.  
  458. window.watchRoom = (code) => {
  459. window.open(`https://gartic.io/${code}/viewer`, '_blank');
  460. };
  461.  
  462. window.showUsers = (roomCode) => {
  463. const usersGrid = document.getElementById(`users-${roomCode}`);
  464. const isVisible = usersGrid.style.display === 'grid';
  465. if (!isVisible) {
  466. usersGrid.style.display = 'grid';
  467. loadRoomUsers(roomCode);
  468. } else {
  469. usersGrid.style.display = 'none';
  470. }
  471. };
  472.  
  473. function loadRoomUsers(roomCode) {
  474. const usersGrid = document.getElementById(`users-${roomCode}`);
  475. usersGrid.innerHTML = '';
  476.  
  477. const servers = ['01', '02', '03', '04', '05', '06'];
  478. let connectedServer = false;
  479.  
  480. function tryNextServer(index) {
  481. if (index >= servers.length || connectedServer) return;
  482.  
  483. const ws = new WebSocket(`wss://server${servers[index]}.gartic.io/socket.io/?EIO=3&transport=websocket`);
  484. ws.onopen = () => {
  485. ws.send(`42[12,{"v":20000,"platform":0,"sala":"${roomCode.slice(-4)}"}]`);
  486. };
  487.  
  488. ws.onmessage = (msg) => {
  489. if (msg.data.startsWith('42[5,')) {
  490. try {
  491. const data = JSON.parse(msg.data.slice(2));
  492. if (data[0] === 5 && Array.isArray(data[5])) {
  493. connectedServer = true;
  494. displayUsers(data[5], usersGrid);
  495. ws.close();
  496. }
  497. } catch (e) {
  498. console.error('JSON parse error:', e);
  499. }
  500. }
  501. };
  502.  
  503. ws.onerror = () => {
  504. tryNextServer(index + 1);
  505. };
  506.  
  507. ws.onclose = () => {
  508. if (!connectedServer) {
  509. tryNextServer(index + 1);
  510. }
  511. };
  512. }
  513.  
  514. tryNextServer(0);
  515. }
  516.  
  517. function displayUsers(users, container) {
  518. users.forEach(user => {
  519. const userContainer = document.createElement('div');
  520. userContainer.style.position = 'relative';
  521. const avatar = document.createElement('img');
  522. avatar.className = 'user-avatar';
  523. avatar.src = user.foto || `https://gartic.io/static/images/avatar/svg/${user.avatar}.svg`;
  524. avatar.setAttribute('data-nick', user.nick);
  525. avatar.setAttribute('data-points', user.pontos || 0);
  526. avatar.addEventListener('mouseenter', showTooltip);
  527. avatar.addEventListener('mouseleave', hideTooltip);
  528. userContainer.appendChild(avatar);
  529. container.appendChild(userContainer);
  530. });
  531. }
  532.  
  533. function showTooltip(event) {
  534. const avatar = event.target;
  535. const nick = avatar.getAttribute('data-nick');
  536. const points = avatar.getAttribute('data-points');
  537.  
  538. const tooltip = document.createElement('div');
  539. tooltip.className = 'nickname-tooltip';
  540. tooltip.innerHTML = `
  541. <div>${nick}</div>
  542. <div style="font-size: 11px">${points} puan</div>
  543. `;
  544.  
  545. const rect = avatar.getBoundingClientRect();
  546. tooltip.style.position = 'fixed';
  547. tooltip.style.left = `${rect.left + rect.width/2}px`;
  548. tooltip.style.top = `${rect.top - 10}px`;
  549. tooltip.style.transform = 'translate(-50%, -100%)';
  550. tooltip.style.opacity = '1';
  551.  
  552. document.body.appendChild(tooltip);
  553. avatar.tooltip = tooltip;
  554. }
  555.  
  556. function hideTooltip(event) {
  557. const tooltip = event.target.tooltip;
  558. if (tooltip) {
  559. tooltip.style.opacity = '0';
  560. setTimeout(() => tooltip.remove(), 200);
  561. }
  562. }
  563.  
  564. window.updateRooms();
  565. setInterval(window.updateRooms, 5000);
  566.  
  567. function handleResize() {
  568. const container = document.querySelector('.container');
  569. container.style.height = `${window.innerHeight}px`;
  570. }
  571.  
  572. window.addEventListener('resize', handleResize);
  573. handleResize();
  574.  
  575. let updateTimeout;
  576. window.filterRooms = (query) => {
  577. clearTimeout(updateTimeout);
  578. updateTimeout = setTimeout(() => {
  579. query = query.toLowerCase();
  580. filteredRooms = roomsData.filter(room =>
  581. room.code.toLowerCase().includes(query)
  582. );
  583. updateRoomsDisplay();
  584. }, 300);
  585. };
  586. }