NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name SPEED!AUTO-KILL AND AUTO-TELEPORT(craftine.io) // @namespace https://openuserjs.org/user/KeineAhnung4u // @version 1.0 // @description Teleport and shoot to a selected player by name or everyone // @author KeineAhnung4u // @match https://craftnite.io/* // @grant GM_addStyle // @license Artistic-2.0 // @copyright 2025, KeineAhnung4u (https://openuserjs.org/users/KeineAhnung4u) // ==/UserScript== (function() { 'use strict'; let selectedPlayerNames = []; let rapidFireEnabled = false; let rapidFireInterval = null; let autoSelectEnabled = false; let autoSelectInterval = null; function createUI() { const container = document.createElement('div'); container.id = 'controlContainer'; container.style.position = 'fixed'; container.style.top = '10px'; container.style.left = '10px'; container.style.backgroundColor = 'rgba(0, 0, 0, 0.8)'; container.style.padding = '10px'; container.style.borderRadius = '5px'; container.style.zIndex = '1000'; const jlText = document.createElement('div'); jlText.innerHTML = '☙𝕵𝕷❧'; jlText.style.fontSize = '12px'; jlText.style.color = 'white'; jlText.style.textAlign = 'center'; jlText.style.marginBottom = '10px'; jlText.style.userSelect = 'none'; jlText.style.animation = 'colorChange 5s infinite'; jlText.addEventListener('click', () => { const message = document.createElement('div'); message.id = 'jlMessage'; message.innerText = 'Hi! My name is ☙𝕵𝕷❧'; message.style.position = 'absolute'; message.style.top = '0px'; message.style.left = '50%'; message.style.transform = 'translateX(-50%)'; message.style.backgroundColor = 'rgba(0, 0, 0, 0.8)'; message.style.color = 'white'; message.style.padding = '5px'; message.style.borderRadius = '5px'; message.style.userSelect = 'none'; message.style.textAlign = 'center'; container.appendChild(message); setTimeout(() => { message.remove(); }, 3000); }); container.appendChild(jlText); GM_addStyle(` @keyframes colorChange { 0% { color: red; } 25% { color: orange; } 50% { color: yellow; } 75% { color: green; } 100% { color: blue; } } #showButton:hover { opacity: 1 !important; } `); const selectAllCheckbox = document.createElement('input'); selectAllCheckbox.type = 'checkbox'; selectAllCheckbox.id = 'selectAllCheckbox'; selectAllCheckbox.style.marginRight = '10px'; selectAllCheckbox.addEventListener('change', () => { const checkboxes = document.querySelectorAll('.playerCheckbox'); checkboxes.forEach(checkbox => { checkbox.checked = selectAllCheckbox.checked; updateSelectedPlayers(); }); selectAllEnabled = selectAllCheckbox.checked; }); const selectAllLabel = document.createElement('label'); selectAllLabel.htmlFor = 'selectAllCheckbox'; selectAllLabel.innerText = 'Select All'; selectAllLabel.style.color = 'white'; selectAllLabel.style.marginRight = '10px'; const okButton = document.createElement('button'); okButton.innerText = 'OK'; okButton.onclick = () => { updateSelectedPlayers(); console.log(`Selected players: ${selectedPlayerNames.join(', ')}`); if (selectAllEnabled) { startMonitoringNewPlayers(); } }; const updateButton = document.createElement('button'); updateButton.innerText = 'Update'; updateButton.onclick = updatePlayerList; const hideButton = document.createElement('button'); hideButton.innerText = 'Hide'; hideButton.onclick = toggleMenuVisibility; container.appendChild(selectAllCheckbox); container.appendChild(selectAllLabel); container.appendChild(okButton); container.appendChild(updateButton); container.appendChild(hideButton); const playerListContainer = document.createElement('div'); playerListContainer.id = 'playerListContainer'; container.appendChild(playerListContainer); document.body.appendChild(container); const statusContainer = document.createElement('div'); statusContainer.id = 'statusContainer'; statusContainer.style.position = 'fixed'; statusContainer.style.bottom = '25%'; statusContainer.style.right = '10px'; statusContainer.style.backgroundColor = 'rgba(0, 0, 0, 0.8)'; statusContainer.style.padding = '10px'; statusContainer.style.borderRadius = '5px'; statusContainer.style.zIndex = '1000'; statusContainer.style.color = 'white'; statusContainer.style.opacity = '1'; statusContainer.style.transition = 'opacity 0.5s'; statusContainer.innerHTML = ` <div>Rapid Fire: <span id="rapidFireStatus">Disabled</span></div> `; document.body.appendChild(statusContainer); } function updatePlayerList() { const playerListContainer = document.getElementById('playerListContainer'); if (!playerListContainer) return; playerListContainer.innerHTML = ''; const players = getOtherPlayers(); players.forEach(player => { const checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.className = 'playerCheckbox'; checkbox.value = player.name; checkbox.style.marginRight = '10px'; checkbox.addEventListener('change', updateSelectedPlayers); const label = document.createElement('label'); label.htmlFor = player.name; label.innerText = `${player.id}: ${player.name}`; label.style.color = 'white'; playerListContainer.appendChild(checkbox); playerListContainer.appendChild(label); playerListContainer.appendChild(document.createElement('br')); }); } function toggleMenuVisibility() { const container = document.getElementById('controlContainer'); const statusContainer = document.getElementById('statusContainer'); const showButton = document.createElement('button'); if (container.style.display !== 'none') { container.style.display = 'none'; statusContainer.style.opacity = '0.3'; statusContainer.style.pointerEvents = 'none'; showButton.innerText = 'Show'; showButton.id = 'showButton'; showButton.style.position = 'fixed'; showButton.style.top = '10px'; showButton.style.left = '10px'; showButton.style.zIndex = '1000'; showButton.style.opacity = '0.1'; showButton.onclick = toggleMenuVisibility; document.body.appendChild(showButton); } else { container.style.display = 'block'; statusContainer.style.opacity = '1'; statusContainer.style.pointerEvents = 'auto'; const showButtonElement = document.getElementById('showButton'); if (showButtonElement) { showButtonElement.remove(); } } } function updateSelectedPlayers() { selectedPlayerNames = []; const checkboxes = document.querySelectorAll('.playerCheckbox'); checkboxes.forEach(checkbox => { if (checkbox.checked) { selectedPlayerNames.push(checkbox.value); } }); } function getOtherPlayers() { return G.othera822ers.filter(player => player && player.a240); } function startMonitoringNewPlayers() { setInterval(() => { const currentPlayers = getOtherPlayers(); currentPlayers.forEach(player => { if (!selectedPlayerNames.includes(player.name)) { selectedPlayerNames.push(player.name); console.log(`New player added: ${player.name}`); } }); }, 1000); } function tp(pos, updateVisual = true) { let me = GAME.a865.player; var pkt = new a175(); pkt.time = parseFloat(("" + Date.now() / 1e3).slice(4)); pkt.x = pos.x; pkt.y = pos.y; pkt.z = pos.z; pkt.a751 = me.a751; if (updateVisual) { me.controls.moveCameraTo(pos); me.position.copy(pos); } if (me.camera != null) { me.camera.rotation.order = "YXZ"; pkt.a748 = me.camera.rotation.y; pkt.a749 = me.camera.rotation.x; } G.socket.send(pkt.a614()); } function addCustomChat(name, msg) { if (msg.trim() !== "") { GAME.chat.push({ name: name, msg: msg }); if (GAME.chat.length > 5) GAME.chat = GAME.chat.slice(GAME.chat.length - 5, GAME.chat.length); GAME.newChatMessage = true; } } function shootAtPosition(position) { let me = GAME.a865.player; let direction = new THREE.Vector3(); // Calculate the direction vector to point downwards (90 degrees) direction.set(0, -1, 0).normalize(); direction.multiplyScalar(500000); // Bullet speed is set here (5x increased) const a = 8; const b = 9; try { // Shoot the bullet 15 times (3x increased bullet count) for (let i = 0; i < 15; i++) { GAME.a865.player.a609(a, b, { headshotMsg: ["boom ", "headshot"], headshotColor: ["rgba(255,0,0,{opacity})", "rgba(255,255,255,{opacity})"] }, false, false, direction); } console.log(`Shot at position: ${position.x}, ${position.y}, ${position.z}`); } catch (error) { console.log(`Failed to shoot at position: ${position.x}, ${position.y}, ${position.z}: ${error.message}`); } } function temporarilyMoveAndShoot() { let me = GAME.a865.player; const originalPosition = me.position.clone(); const players = getOtherPlayers().filter(player => selectedPlayerNames.includes(player.name)); if (players.length === 0) { console.log("No selected players found."); return; } players.forEach(player => { try { me.position.copy(player.position); shootAtPosition(player.position); } catch (error) { console.log(`Failed to shoot at ${player.name}: ${error.message}`); } }); me.position.copy(originalPosition); } function rapidFire() { let me = GAME.a865.player; const originalPosition = me.position.clone(); const players = getOtherPlayers(); if (players.length === 0) { console.log("No players found."); return; } players.forEach(player => { const playerWorldPosition = new THREE.Vector3(); player.a240.getWorldPosition(playerWorldPosition); // Observer to check if player is alive const respawnObserver = setInterval(() => { if (player.a240.visible) { clearInterval(respawnObserver); try { me.position.copy(playerWorldPosition); shootAtPosition(playerWorldPosition); } catch (error) { console.log(`Failed to shoot at ${player.name}: ${error.message}`); } } }, 100); // Check if the player is already alive if (player.a240.visible) { try { me.position.copy(playerWorldPosition); shootAtPosition(playerWorldPosition); } catch (error) { console.log(`Failed to shoot at ${player.name}: ${error.message}`); } } }); me.position.copy(originalPosition); // Ensure new players are added continuously while rapid fire is enabled startMonitoringNewPlayers(); } document.addEventListener('keydown', function(event) { if (event.key === ',') { rapidFireEnabled = !rapidFireEnabled; console.log("Rapid fire " + (rapidFireEnabled ? "enabled" : "disabled")); const rapidFireStatusElement = document.getElementById('rapidFireStatus'); if (rapidFireStatusElement) { rapidFireStatusElement.innerText = rapidFireEnabled ? 'Enabled' : 'Disabled'; } if (rapidFireEnabled) { rapidFireInterval = setInterval(rapidFire, 1000); } else { clearInterval(rapidFireInterval); rapidFireInterval = null; } } else if (event.key === '6') { autoSelectEnabled = !autoSelectEnabled; console.log("Auto select " + (autoSelectEnabled ? "enabled" : "disabled")); if (autoSelectEnabled) { autoSelectInterval = setInterval(() => { selectedPlayerNames = getOtherPlayers().map(player => player.name); console.log(`Auto-selected players: ${selectedPlayerNames.join(', ')}`); temporarilyMoveAndShoot(); }, 1000); } else { clearInterval(autoSelectInterval); autoSelectInterval = null; } } }); window.addEventListener('load', createUI); })();