ShareShortcuts

Roblox

A 3d version of Roblox taht sucks and you shouldn’t use

lhazelhayesispeak
Создать форк «Roblox»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы lhazelhayesispeak получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
3K
Сохранено
0
Действия
3
Категория
Fun
Версия
1.0
Язык
EN

A 3d version of Roblox taht sucks and you shouldn’t use

Что нового

Версия 1.0

First release

История версий
1.0 4 авг 2026 г.

First release

Что делает

Действий: 3
  1. Text
  2. Set Name
  3. Show Web Page

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#include 'actions/web'
#define color darkgray
#define glyph iPhone

const Text = "<!DOCTYPE html>\n<html lang=\\"en\\">\n<head>\n    <meta charset=\\"UTF-8\\">\n    <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\\">\n    <title>sroblox - Home</title>\n    <style>\n        body {\n            margin: 0;\n            overflow: hidden;\n            background-color: #87CEEB;\n            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n            touch-action: none;\n        }\n        canvas { display: block; position: absolute; top: 0; left: 0; z-index: 1; }\n        \n        /* HOME PAGE UI */\n        #home-page {\n            position: absolute;\n            top: 0; left: 0; width: 100%; height: 100%;\n            background-color: #f2f4f5;\n            z-index: 100;\n            display: flex;\n            flex-direction: column;\n            overflow-y: auto;\n        }\n        #navbar {\n            background-color: #393b3d;\n            color: white;\n            padding: 15px 20px;\n            font-size: 24px;\n            font-weight: bold;\n            box-shadow: 0 2px 5px rgba(0,0,0,0.3);\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n        }\n        .nav-buttons { display: flex; gap: 10px; }\n        .nav-btn {\n            background: #00b06f;\n            border: none;\n            color: white;\n            padding: 8px 15px;\n            border-radius: 4px;\n            font-weight: bold;\n            cursor: pointer;\n        }\n        .main-container {\n            display: flex;\n            max-width: 1100px;\n            margin: 20px auto;\n            width: 100%;\n            gap: 20px;\n            box-sizing: border-box;\n            padding: 0 20px;\n        }\n        .games-section { flex-grow: 1; }\n        \n        .games-grid {\n            display: grid;\n            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n            gap: 20px;\n        }\n        .games-title {\n            font-size: 22px;\n            color: #393b3d;\n            margin-bottom: 15px;\n            border-bottom: 2px solid #ccc;\n            padding-bottom: 5px;\n        }\n        .game-card {\n            background: white;\n            border-radius: 8px;\n            box-shadow: 0 4px 8px rgba(0,0,0,0.1);\n            overflow: hidden;\n            display: flex;\n            flex-direction: column;\n        }\n        .thumbnail {\n            height: 160px;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            color: white;\n            font-size: 24px;\n            font-weight: bold;\n            text-shadow: 2px 2px 4px rgba(0,0,0,0.4);\n            text-align: center;\n            padding: 0 10px;\n        }\n        .thumb-obby { background: linear-gradient(45deg, #4CAF50, #2E7D32); }\n        .thumb-mm2 { background: linear-gradient(45deg, #8B0000, #4A0000); }\n        .thumb-rivals { background: linear-gradient(45deg, #1E90FF, #00008B); }\n        .thumb-nds { background: linear-gradient(45deg, #FF8C00, #FF4500); }\n\n        .game-info { padding: 15px; }\n        .game-title { font-size: 16px; font-weight: bold; margin: 0 0 5px 0; color: #333; }\n        .game-creator { font-size: 13px; color: #666; margin: 0 0 15px 0; }\n        \n        .play-btn {\n            background-color: #00b06f;\n            color: white; border: none; border-radius: 4px;\n            padding: 10px; font-size: 16px; font-weight: bold;\n            width: 100%; cursor: pointer;\n            box-shadow: 0 2px 4px rgba(0,0,0,0.2);\n        }\n        .play-btn:active { background-color: #008f5a; }\n\n        /* FRIENDS PANEL */\n        #friends-panel {\n            width: 250px;\n            background: white;\n            border-radius: 8px;\n            box-shadow: 0 4px 8px rgba(0,0,0,0.1);\n            padding: 15px;\n            height: fit-content;\n        }\n        .friends-title {\n            font-size: 18px;\n            font-weight: bold;\n            color: #393b3d;\n            margin-bottom: 10px;\n            border-bottom: 2px solid #ccc;\n            padding-bottom: 5px;\n        }\n        .friend-item {\n            display: flex;\n            align-items: center;\n            padding: 8px 0;\n            border-bottom: 1px solid #eee;\n            font-size: 14px;\n            color: #333;\n        }\n        .friend-status {\n            width: 10px;\n            height: 10px;\n            background-color: #4CAF50;\n            border-radius: 50%;\n            margin-right: 10px;\n        }\n\n        /* AVATAR CUSTOMIZER MODAL */\n        #avatar-modal {\n            position: fixed;\n            top: 0; left: 0; width: 100%; height: 100%;\n            background: rgba(0,0,0,0.6);\n            display: none;\n            justify-content: center;\n            align-items: center;\n            z-index: 200;\n        }\n        .modal-content {\n            background: white;\n            padding: 25px;\n            border-radius: 10px;\n            width: 320px;\n            box-shadow: 0 5px 15px rgba(0,0,0,0.3);\n        }\n        .modal-title { font-size: 20px; font-weight: bold; margin-bottom: 15px; color: #333; }\n        .color-picker-group { margin-bottom: 15px; }\n        .color-picker-group label { display: block; font-size: 14px; font-weight: bold; margin-bottom: 5px; color: #555; }\n        .color-picker-group input { width: 100%; height: 40px; border: none; border-radius: 4px; cursor: pointer; }\n        .close-modal-btn {\n            background: #0078d7; color: white; border: none; padding: 10px;\n            width: 100%; border-radius: 4px; font-weight: bold; cursor: pointer;\n        }\n\n        /* IN-GAME UI OVERLAYS */\n        #ui-layer {\n            position: absolute;\n            top: 0; left: 0; width: 100%; height: 100%;\n            pointer-events: none;\n            z-index: 10;\n            display: none; \n        }\n\n        #game-hud {\n            position: absolute; top: 10px; right: 280px;\n            background: rgba(0,0,0,0.6); color: white;\n            padding: 8px 15px; border-radius: 8px; font-weight: bold; font-size: 15px;\n            pointer-events: auto; text-align: center;\n        }\n\n        /* INVENTORY BAR */\n        #inventory-bar {\n            position: absolute; top: 10px; right: 10px;\n            display: flex; gap: 5px; pointer-events: auto;\n        }\n        .inv-slot {\n            width: 45px; height: 45px; background: rgba(0,0,0,0.6);\n            border: 2px solid #555; border-radius: 6px;\n            display: flex; justify-content: center; align-items: center;\n            color: white; font-size: 12px; font-weight: bold; text-align: center;\n        }\n        .inv-slot.active { border-color: #00ff00; background: rgba(0,100,0,0.6); }\n\n        #crosshair {\n            position: absolute; top: 50%; left: 50%;\n            width: 12px; height: 12px; transform: translate(-50%, -50%);\n            border: 2px solid rgba(0,255,0,0.8); border-radius: 50%;\n            pointer-events: none; display: none;\n        }\n\n        #chat-container {\n            position: absolute; top: 10px; left: 10px;\n            width: 280px; max-width: 45%;\n            pointer-events: auto;\n            background: rgba(0, 0, 0, 0.4);\n            border-radius: 8px; padding: 10px;\n            display: flex; flex-direction: column;\n        }\n        #chat-log {\n            height: 80px; overflow-y: auto;\n            color: white; font-size: 13px;\n            margin-bottom: 5px; text-shadow: 1px 1px 2px black;\n        }\n        #chat-input-wrapper { display: flex; }\n        #chat-input {\n            flex-grow: 1; padding: 4px; border: none;\n            border-radius: 4px; outline: none; font-size: 12px;\n        }\n        #chat-send {\n            background: #0078d7; color: white; border: none;\n            padding: 4px 8px; margin-left: 5px; border-radius: 4px; font-size: 12px;\n        }\n\n        #d-pad {\n            position: absolute; bottom: 20px; left: 20px;\n            width: 150px; height: 150px; pointer-events: auto;\n        }\n        .d-btn {\n            position: absolute; width: 45px; height: 45px;\n            background: rgba(255, 255, 255, 0.7);\n            border: 2px solid rgba(0,0,0,0.5); border-radius: 8px;\n            font-weight: bold; font-size: 20px;\n            display: flex; justify-content: center; align-items: center;\n            user-select: none; color: #333;\n        }\n        .d-btn:active { background: rgba(255, 255, 255, 1); }\n        #btn-w { top: 0; left: 52px; }\n        #btn-s { bottom: 0; left: 52px; }\n        #btn-a { top: 52px; left: 0; }\n        #btn-d { top: 52px; right: 0; }\n        \n        #btn-jump {\n            position: absolute; bottom: 20px; right: 20px;\n            width: 60px; height: 60px; font-size: 24px;\n            pointer-events: auto; border-radius: 50%;\n        }\n        #btn-action {\n            position: absolute; bottom: 95px; right: 25px;\n            width: 65px; height: 65px; font-size: 14px; background: #ff3333; color: white;\n            pointer-events: auto; border-radius: 50%; border: 2px solid white; display: none; justify-content: center; align-items: center; font-weight: bold;\n        }\n        #btn-action:active { background: #cc0000; }\n    </style>\n</head>\n<body>\n\n    <!-- HOME PAGE -->\n    <div id=\\"home-page\\">\n        <div id=\\"navbar\\">\n            <span>sroblox</span>\n            <div class=\\"nav-buttons\\">\n                <button class=\\"nav-btn\\" id=\\"nav-avatar-btn\\">Avatar</button>\n                <button class=\\"nav-btn\\" id=\\"nav-friends-btn\\">Friends (3)</button>\n            </div>\n        </div>\n        <div class=\\"main-container\\">\n            <div class=\\"games-section\\">\n                <div class=\\"games-title\\">Featured Games</div>\n                <div class=\\"games-grid\\">\n                    <div class=\\"game-card\\">\n                        <div class=\\"thumbnail thumb-obby\\">SIMPLE OBBY</div>\n                        <div class=\\"game-info\\">\n                            <p class=\\"game-title\\">Simple Obby</p>\n                            <p class=\\"game-creator\\">By Kymani</p>\n                            <button class=\\"play-btn\\" data-game=\\"obby\\">Play</button>\n                        </div>\n                    </div>\n                    <div class=\\"game-card\\">\n                        <div class=\\"thumbnail thumb-mm2\\">MURDER MYSTERY 2</div>\n                        <div class=\\"game-info\\">\n                            <p class=\\"game-title\\">Murder Mystery 2</p>\n                            <p class=\\"game-creator\\">By Nikilis</p>\n                            <button class=\\"play-btn\\" data-game=\\"mm2\\">Play</button>\n                        </div>\n                    </div>\n                    <div class=\\"game-card\\">\n                        <div class=\\"thumbnail thumb-rivals\\">RIVALS</div>\n                        <div class=\\"game-info\\">\n                            <p class=\\"game-title\\">Rivals</p>\n                            <p class=\\"game-creator\\">By Nosniy Games</p>\n                            <button class=\\"play-btn\\" data-game=\\"rivals\\">Play</button>\n                        </div>\n                    </div>\n                    <div class=\\"game-card\\">\n                        <div class=\\"thumbnail thumb-nds\\">NATURAL DISASTER SURVIVAL</div>\n                        <div class=\\"game-info\\">\n                            <p class=\\"game-title\\">Natural Disaster Survival</p>\n                            <p class=\\"game-creator\\">By Telamon</p>\n                            <button class=\\"play-btn\\" data-game=\\"nds\\">Play</button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            \n            <div id=\\"friends-panel\\">\n                <div class=\\"friends-title\\">Friends Online</div>\n                <div class=\\"friend-item\\"><div class=\\"friend-status\\"></div>Robloxian_Pro</div>\n                <div class=\\"friend-item\\"><div class=\\"friend-status\\"></div>Builderman99</div>\n                <div class=\\"friend-item\\"><div class=\\"friend-status\\"></div>NoobMaster</div>\n            </div>\n        </div>\n    </div>\n\n    <!-- AVATAR MODAL -->\n    <div id=\\"avatar-modal\\">\n        <div class=\\"modal-content\\">\n            <div class=\\"modal-title\\">Customize Avatar</div>\n            <div class=\\"color-picker-group\\">\n                <label>Torso Color</label>\n                <input type=\\"color\\" id=\\"color-torso\\" value=\\"#ff4500\\">\n            </div>\n            <div class=\\"color-picker-group\\">\n                <label>Skin / Head Color</label>\n                <input type=\\"color\\" id=\\"color-head\\" value=\\"#f1c27d\\">\n            </div>\n            <div class=\\"color-picker-group\\">\n                <label>Limbs Color</label>\n                <input type=\\"color\\" id=\\"color-limbs\\" value=\\"#aaaaaa\\">\n            </div>\n            <button class=\\"close-modal-btn\\" id=\\"close-avatar\\">Save & Close</button>\n        </div>\n    </div>\n\n    <!-- IN GAME UI -->\n    <div id=\\"ui-layer\\">\n        <div id=\\"game-hud\\">Lobby: Waiting...</div>\n        <div id=\\"inventory-bar\\">\n            <div class=\\"inv-slot active\\" id=\\"slot-1\\">1</div>\n            <div class=\\"inv-slot\\" id=\\"slot-2\\">2</div>\n            <div class=\\"inv-slot\\" id=\\"slot-3\\">3</div>\n        </div>\n        <div id=\\"crosshair\\"></div>\n        <div id=\\"chat-container\\">\n            <div id=\\"chat-log\\"></div>\n            <div id=\\"chat-input-wrapper\\">\n                <input type=\\"text\\" id=\\"chat-input\\" placeholder=\\"Chat or /e dance...\\">\n                <button id=\\"chat-send\\">Send</button>\n            </div>\n        </div>\n\n        <div id=\\"d-pad\\">\n            <div class=\\"d-btn\\" id=\\"btn-w\\">W</div>\n            <div class=\\"d-btn\\" id=\\"btn-a\\">A</div>\n            <div class=\\"d-btn\\" id=\\"btn-s\\">S</div>\n            <div class=\\"d-btn\\" id=\\"btn-d\\">D</div>\n        </div>\n        \n        <div class=\\"d-btn\\" id=\\"btn-jump\\">↑</div>\n        <div class=\\"d-btn\\" id=\\"btn-action\\">SHOOT</div>\n    </div>\n\n    <script src=\\"https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js\\"></script>\n    \n    <script>\n        const scene = new THREE.Scene();\n        scene.background = new THREE.Color(0x87CEEB); \n        scene.fog = new THREE.Fog(0x87CEEB, 40, 160);\n        \n        const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.1, 1000);\n        const renderer = new THREE.WebGLRenderer({ antialias: true });\n        renderer.setSize(window.innerWidth, window.innerHeight);\n        document.body.appendChild(renderer.domElement);\n\n        const ambientLight = new THREE.AmbientLight(0xffffff, 0.6);\n        scene.add(ambientLight);\n        const dirLight = new THREE.DirectionalLight(0xffffff, 0.8);\n        dirLight.position.set(20, 40, 20);\n        scene.add(dirLight);\n\n        let playerColors = { torso: 0xff4500, head: 0xf1c27d, limbs: 0xaaaaaa };\n\n        document.getElementById('nav-avatar-btn').addEventListener('click', () => {\n            document.getElementById('avatar-modal').style.display = 'flex';\n        });\n        document.getElementById('close-avatar').addEventListener('click', () => {\n            playerColors.torso = parseInt(document.getElementById('color-torso').value.replace('#', '0x'));\n            playerColors.head = parseInt(document.getElementById('color-head').value.replace('#', '0x'));\n            playerColors.limbs = parseInt(document.getElementById('color-limbs').value.replace('#', '0x'));\n            document.getElementById('avatar-modal').style.display = 'none';\n        });\n\n        const faceCanvas = document.createElement('canvas');\n        faceCanvas.width = 128; faceCanvas.height = 128;\n        const ctx = faceCanvas.getContext('2d');\n        ctx.fillStyle = '#f1c27d'; ctx.fillRect(0,0,128,128); \n        ctx.fillStyle = '#000000';\n        ctx.fillRect(32, 40, 16, 16); ctx.fillRect(80, 40, 16, 16); \n        ctx.beginPath(); ctx.arc(64, 80, 32, 0, Math.PI, false); \n        ctx.lineWidth = 8; ctx.stroke();\n        const faceTexture = new THREE.CanvasTexture(faceCanvas);\n        faceTexture.magFilter = THREE.NearestFilter; \n\n        function createRobloxian(torsoColor, headColor, limbColor, weaponType, isFirstPerson = false) {\n            const group = new THREE.Group();\n            const matTorso = new THREE.MeshLambertMaterial({ color: torsoColor });\n            const matLimb = new THREE.MeshLambertMaterial({ color: limbColor });\n            const matHeadBlank = new THREE.MeshLambertMaterial({ color: headColor });\n            const matHeadFace = new THREE.MeshLambertMaterial({ map: faceTexture, color: 0xffffff });\n            const headMaterials = [matHeadBlank, matHeadBlank, matHeadBlank, matHeadBlank, matHeadFace, matHeadBlank];\n\n            const torso = new THREE.Mesh(new THREE.BoxGeometry(2, 2, 1), matTorso);\n            torso.position.y = 3; \n            if (!isFirstPerson) group.add(torso);\n\n            const head = new THREE.Mesh(new THREE.BoxGeometry(1.2, 1.2, 1.2), headMaterials);\n            head.position.y = 4.6; \n            if (!isFirstPerson) group.add(head);\n\n            function createLimb(xOffset, yPivot) {\n                const pivot = new THREE.Group();\n                pivot.position.set(xOffset, yPivot, 0);\n                const limb = new THREE.Mesh(new THREE.BoxGeometry(1, 2, 1), matLimb);\n                limb.position.set(0, -1, 0); \n                pivot.add(limb); \n                if (!isFirstPerson) group.add(pivot);\n                return pivot;\n            }\n\n            const leftArm = createLimb(-1.5, 4);\n            const rightArm = createLimb(1.5, 4);\n            const leftLeg = createLimb(-0.5, 2);\n            const rightLeg = createLimb(0.5, 2);\n\n            if (isFirstPerson && (weaponType === 'rifle' || weaponType === 'gun')) {\n                const fpGunGroup = new THREE.Group();\n                const body = new THREE.Mesh(new THREE.BoxGeometry(0.3, 0.4, 2.0), new THREE.MeshLambertMaterial({ color: 0x111111 }));\n                const barrel = new THREE.Mesh(new THREE.CylinderGeometry(0.06, 0.06, 1.2), new THREE.MeshLambertMaterial({ color: 0x555555 }));\n                barrel.rotation.x = Math.PI / 2; barrel.position.z = -1.2;\n                fpGunGroup.add(body, barrel);\n                fpGunGroup.position.set(0.6, -0.6, -1.2);\n                group.add(fpGunGroup);\n            } else if (weaponType === 'gun') {\n                const gun = new THREE.Group();\n                const body = new THREE.Mesh(new THREE.BoxGeometry(0.3, 0.4, 1.5), new THREE.MeshLambertMaterial({ color: 0x222222 }));\n                gun.add(body);\n                gun.position.set(0, -1.2, -0.6); gun.rotation.x = Math.PI / 2;\n                rightArm.add(gun);\n            } else if (weaponType === 'knife') {\n                const knife = new THREE.Group();\n                const blade = new THREE.Mesh(new THREE.BoxGeometry(0.1, 0.6, 0.15), new THREE.MeshLambertMaterial({ color: 0xff0000 }));\n                blade.position.z = -0.4;\n                knife.add(blade);\n                knife.position.set(0, -1.2, -0.4); knife.rotation.x = Math.PI / 2;\n                rightArm.add(knife);\n            }\n\n            group.userData = { leftArm, rightArm, leftLeg, rightLeg, walkTime: 0, isDancing: false, danceTime: 0 };\n            return group;\n        }\n\n        let player;\n        let npcs = [];\n        let colliders = [];\n        let playerRole = \\"Innocent\\";\n        let activeGameType = \\"\\";\n        let playerHasWeapon = false;\n        let inLobby = true;\n        let lobbyTimer = 5;\n        let disasterTimer = 20;\n        let currentDisaster = \\"None\\";\n        let disasterActive = false;\n        let floodMesh = null;\n\n        function buildGameWorld(gameType) {\n            activeGameType = gameType;\n            colliders = [];\n            npcs.forEach(n => scene.remove(n.mesh));\n            npcs = [];\n            if (player) scene.remove(player);\n            if (floodMesh) { scene.remove(floodMesh); floodMesh = null; }\n\n            inLobby = true;\n            lobbyTimer = 5;\n            disasterActive = false;\n            currentDisaster = \\"None\\";\n\n            let weapon = 'none';\n            playerHasWeapon = false;\n            let isFirstPerson = (gameType === 'rivals');\n\n            const actionBtn = document.getElementById('btn-action');\n            const crosshair = document.getElementById('crosshair');\n\n            document.getElementById('slot-1').innerText = gameType === 'obby' ? 'Obby' : (gameType === 'mm2' ? 'Role' : (gameType === 'rivals' ? 'Rifle' : 'Survive'));\n            document.getElementById('slot-2').innerText = 'Empty';\n            document.getElementById('slot-3').innerText = 'Emote';\n\n            if (gameType === 'obby') {\n                actionBtn.style.display = 'none';\n                crosshair.style.display = 'none';\n            } else if (gameType === 'mm2') {\n                const roles = ['Sheriff', 'Murderer', 'Innocent'];\n                playerRole = roles[Math.floor(Math.random() * roles.length)];\n                if (playerRole === 'Sheriff') { weapon = 'gun'; playerHasWeapon = true; }\n                else if (playerRole === 'Murderer') { weapon = 'knife'; playerHasWeapon = true; }\n                actionBtn.style.display = playerHasWeapon ? 'flex' : 'none';\n                crosshair.style.display = playerHasWeapon ? 'block' : 'none';\n            } else if (gameType === 'rivals') {\n                playerRole = \\"Combatant\\";\n                weapon = 'rifle';\n                playerHasWeapon = true;\n                actionBtn.style.display = 'flex';\n                crosshair.style.display = 'block';\n            } else if (gameType === 'nds') {\n                playerRole = \\"Survivor\\";\n                actionBtn.style.display = 'none';\n                crosshair.style.display = 'none';\n            }\n\n            let tColor = playerColors.torso;\n            let lColor = playerColors.limbs;\n            if (gameType === 'mm2') {\n                if (playerRole === 'Murderer') tColor = 0x990000;\n                else if (playerRole === 'Sheriff') tColor = 0x0055ff;\n            }\n\n            player = createRobloxian(tColor, playerColors.head, lColor, weapon, isFirstPerson);\n            scene.add(player);\n\n            function addBox(w, h, d, x, y, z, color) {\n                const geo = new THREE.BoxGeometry(w, h, d);\n                const mat = new THREE.MeshLambertMaterial({ color: color });\n                const mesh = new THREE.Mesh(geo, mat);\n                mesh.position.set(x, y, z);\n                scene.add(mesh);\n                colliders.push({ mesh, w, h, d, x, y, z });\n                return mesh;\n            }\n\n            // Solid Lobby Spawn Room\n            addBox(30, 2, 30, 0, 0, -80, 0x444444);\n            addBox(30, 8, 2, 0, 4, -95, 0x333333);\n\n            if (gameType === 'obby') {\n                const lava = new THREE.Mesh(new THREE.PlaneGeometry(1000, 1000), new THREE.MeshLambertMaterial({ color: 0xff3300 }));\n                lava.rotation.x = -Math.PI / 2; lava.position.y = -5; scene.add(lava);\n                \n                addBox(25, 2, 25, 0, 0, 0, 0x4CAF50);\n                addBox(10, 2, 10, 0, 1, -20, 0xffaa00);\n                addBox(8, 2, 8, 0, 2, -35, 0x00aaff);\n                addBox(8, 2, 8, 12, 3, -45, 0xaa00ff);\n                addBox(25, 2, 25, 45, 4, -45, 0x4CAF50);\n            } else if (gameType === 'mm2') {\n                addBox(140, 2, 140, 0, 0, 0, 0x3a3a3a);\n                addBox(50, 10, 40, 0, 5, -30, 0x7a1c1c);\n                addBox(54, 2, 44, 0, 10, -30, 0x4a0000);\n            } else if (gameType === 'rivals') {\n                addBox(160, 2, 160, 0, 0, 0, 0x111927);\n                addBox(20, 6, 20, 0, 3, -35, 0x00BFFF);\n            } else if (gameType === 'nds') {\n                const ocean = new THREE.Mesh(new THREE.PlaneGeometry(1000, 1000), new THREE.MeshLambertMaterial({ color: 0x0077be }));\n                ocean.rotation.x = -Math.PI / 2; ocean.position.y = -6; scene.add(ocean);\n                \n                addBox(70, 2, 70, 0, 0, 0, 0x228B22);\n                addBox(24, 8, 24, 0, 4, 0, 0xd2b48c);\n                addBox(26, 2, 26, 0, 8, 0, 0xa52a2a);\n            }\n\n            player.position.set(0, 2, -80);\n        }\n\n        let gameActive = false;\n        let playerSpeed = 0.22;\n        let velocityY = 0;\n        let isGrounded = false;\n        const gravity = -0.012;\n        const jumpPower = 0.35;\n\n        document.querySelectorAll('.play-btn').forEach(btn => {\n            btn.addEventListener('click', (e) => {\n                const gameType = e.target.getAttribute('data-game');\n                document.getElementById('home-page').style.display = 'none';\n                document.getElementById('ui-layer').style.display = 'block';\n                buildGameWorld(gameType);\n                gameActive = true;\n            });\n        });\n\n        const keys = { w: false, a: false, s: false, d: false, space: false };\n        let camAngleX = 0; let camAngleY = Math.PI / 6; \n\n        const bindTouch = (id, key) => {\n            const btn = document.getElementById(id);\n            const press = (e) => { e.preventDefault(); e.stopPropagation(); keys[key] = true; };\n            const release = (e) => { e.preventDefault(); e.stopPropagation(); keys[key] = false; };\n            btn.addEventListener('touchstart', press); btn.addEventListener('touchend', release);\n            btn.addEventListener('mousedown', press); btn.addEventListener('mouseup', release);\n            btn.addEventListener('mouseleave', release);\n        };\n        bindTouch('btn-w', 'w'); bindTouch('btn-a', 'a');\n        bindTouch('btn-s', 's'); bindTouch('btn-d', 'd');\n        bindTouch('btn-jump', 'space');\n\n        document.getElementById('btn-action').addEventListener('click', () => {\n            if(!gameActive || inLobby) return;\n            addChatMessage(\\"Action\\", \\"Fired weapon toward target!\\", \\"orange\\");\n            npcs.forEach((npc, index) => {\n                if(player.position.distanceTo(npc.mesh.position) < 25) {\n                    scene.remove(npc.mesh);\n                    npcs.splice(index, 1);\n                    addChatMessage(\\"Combat\\", `Eliminated ${npc.role}!`, \\"#00ff00\\");\n                }\n            });\n        });\n\n        window.addEventListener('keydown', (e) => { \n            if(e.key.toLowerCase() === 'w') keys.w = true;\n            if(e.key.toLowerCase() === 'a') keys.a = true;\n            if(e.key.toLowerCase() === 's') keys.s = true;\n            if(e.key.toLowerCase() === 'd') keys.d = true;\n            if(e.key === ' ') keys.space = true;\n        });\n        window.addEventListener('keyup', (e) => { \n            if(e.key.toLowerCase() === 'w') keys.w = false;\n            if(e.key.toLowerCase() === 'a') keys.a = false;\n            if(e.key.toLowerCase() === 's') keys.s = false;\n            if(e.key.toLowerCase() === 'd') keys.d = false;\n            if(e.key === ' ') keys.space = false;\n        });\n\n        let isDragging = false; let prevMouse = { x: 0, y: 0 };\n        renderer.domElement.addEventListener('pointerdown', (e) => {\n            isDragging = true; prevMouse = { x: e.clientX, y: e.clientY };\n        });\n        window.addEventListener('pointerup', () => isDragging = false);\n        window.addEventListener('pointermove', (e) => {\n            if(isDragging && gameActive) {\n                let deltaX = e.clientX - prevMouse.x;\n                let deltaY = e.clientY - prevMouse.y;\n                camAngleX -= deltaX * 0.01;\n                camAngleY = Math.max(0.05, Math.min(Math.PI/2 - 0.05, camAngleY + deltaY * 0.01));\n                prevMouse = { x: e.clientX, y: e.clientY };\n            }\n        });\n\n        const chatLog = document.getElementById('chat-log');\n        const chatInput = document.getElementById('chat-input');\n        function addChatMessage(sender, message, color = \\"white\\") {\n            const msgEl = document.createElement('div');\n            msgEl.innerHTML = `<span style=\\"color:${color}; font-weight:bold;\\">[${sender}]:</span> ${message}`;\n            chatLog.appendChild(msgEl);\n            chatLog.scrollTop = chatLog.scrollHeight;\n        }\n        document.getElementById('chat-send').addEventListener('click', handleChat);\n        chatInput.addEventListener('keydown', (e) => { if(e.key === 'Enter') handleChat(); });\n        function handleChat() {\n            const text = chatInput.value.trim();\n            if (text === \\"\\") return;\n            chatInput.value = '';\n            if (text.toLowerCase() === \\"/e dance\\") {\n                player.userData.isDancing = true;\n                addChatMessage(\\"System\\", \\"Started dancing!\\", \\"yellow\\");\n            } else {\n                addChatMessage(\\"Kymani\\", text, \\"#00d9ff\\");\n            }\n        }\n\n        const raycaster = new THREE.Raycaster();\n        const downVector = new THREE.Vector3(0, -1, 0);\n\n        function animateCharacter(char, isMoving, isJumping) {\n            const data = char.userData;\n            if (!data.leftArm) return; \n            if (isMoving && data.isDancing) data.isDancing = false;\n            if (isJumping) {\n                data.leftArm.rotation.x = Math.PI;\n                data.rightArm.rotation.x = Math.PI;\n            } else if (data.isDancing) {\n                data.danceTime += 0.2;\n                const swing = Math.sin(data.danceTime);\n                data.leftArm.rotation.x = Math.PI; data.leftArm.rotation.z = swing * 0.5;\n                data.rightArm.rotation.x = Math.PI; data.rightArm.rotation.z = swing * 0.5;\n                char.rotation.y += 0.05;\n            } else if (isMoving) {\n                data.walkTime += 0.25; \n                const swing = Math.sin(data.walkTime) * 1.2;\n                data.leftArm.rotation.x = swing; data.rightArm.rotation.x = -swing;\n                data.leftLeg.rotation.x = -swing; data.rightLeg.rotation.x = swing;\n            } else {\n                data.walkTime = 0;\n                data.leftArm.rotation.x *= 0.8; data.rightArm.rotation.x *= 0.8;\n            }\n        }\n\n        let clock = new THREE.Clock();\n        function animate() {\n            requestAnimationFrame(animate);\n            if (!gameActive || !player) return;\n\n            let delta = clock.getDelta();\n\n            if (inLobby) {\n                lobbyTimer -= delta;\n                document.getElementById('game-hud').innerText = `Lobby Countdown: ${Math.ceil(lobbyTimer)}s`;\n                if (lobbyTimer <= 0) {\n                    inLobby = false;\n                    player.position.set(0, 2, 0);\n                    addChatMessage(\\"System\\", \\"Round started!\\", \\"yellow\\");\n                }\n            } else if (activeGameType === 'nds') {\n                disasterTimer -= delta;\n                if (!disasterActive && disasterTimer <= 0) {\n                    const disasters = [\\"Flood Rising\\", \\"Meteor Shower\\", \\"Volcano Eruption\\"];\n                    currentDisaster = disasters[Math.floor(Math.random() * disasters.length)];\n                    disasterActive = true;\n                    disasterTimer = 25;\n                    addChatMessage(\\"DISASTER\\", `WARNING: ${currentDisaster}!`, \\"red\\");\n                    \n                    if (currentDisaster.includes(\\"Flood\\")) {\n                        floodMesh = new THREE.Mesh(new THREE.PlaneGeometry(1000, 1000), new THREE.MeshLambertMaterial({ color: 0x00aaff, transparent: true, opacity: 0.7 }));\n                        floodMesh.rotation.x = -Math.PI / 2; floodMesh.position.y = 0;\n                        scene.add(floodMesh);\n                    }\n                }\n                if (disasterActive && currentDisaster.includes(\\"Flood\\") && floodMesh) {\n                    if (floodMesh.position.y < 4) floodMesh.position.y += delta * 0.15;\n                }\n                document.getElementById('game-hud').innerText = `Disaster: ${currentDisaster}`;\n            }\n\n            let moveX = 0; let moveZ = 0;\n            if (keys.w) moveZ -= 1;\n            if (keys.s) moveZ += 1;\n            if (keys.a) moveX -= 1;\n            if (keys.d) moveX += 1;\n            let isPlayerMoving = (moveX !== 0 || moveZ !== 0);\n\n            if (isPlayerMoving) {\n                const inputAngle = Math.atan2(moveX, moveZ);\n                const moveAngle = inputAngle + camAngleX;\n                player.position.x += Math.sin(moveAngle) * playerSpeed;\n                player.position.z += Math.cos(moveAngle) * playerSpeed;\n                player.rotation.y = moveAngle;\n            }\n\n            velocityY += gravity;\n            player.position.y += velocityY;\n\n            // Robust Floor Detection\n            raycaster.set(new THREE.Vector3(player.position.x, player.position.y + 1.5, player.position.z), downVector);\n            const intersects = raycaster.intersectObjects(colliders.map(c => c.mesh));\n            \n            if (intersects.length > 0 && intersects[0].distance <= 2.5 && velocityY <= 0) {\n                isGrounded = true;\n                velocityY = 0;\n                player.position.y = intersects[0].point.y; \n            } else {\n                isGrounded = false;\n            }\n\n            if (keys.space && isGrounded) {\n                velocityY = jumpPower;\n                isGrounded = false;\n            }\n\n            // Fallout safety net\n            if (player.position.y < -10 || (floodMesh && player.position.y < floodMesh.position.y)) {\n                player.position.set(0, inLobby ? 2 : 3, inLobby ? -80 : 0);\n                velocityY = 0;\n                addChatMessage(\\"System\\", \\"Respawned back to safety!\\", \\"orange\\");\n            }\n\n            animateCharacter(player, isPlayerMoving, !isGrounded);\n\n            if (!inLobby) {\n                npcs.forEach(npc => {\n                    npc.mesh.lookAt(player.position.x, npc.mesh.position.y, player.position.z);\n                    npc.mesh.translateZ(0.08);\n\n                    raycaster.set(new THREE.Vector3(npc.mesh.position.x, npc.mesh.position.y + 1.5, npc.mesh.position.z), downVector);\n                    const npcIntersects = raycaster.intersectObjects(colliders.map(c => c.mesh));\n                    if (npcIntersects.length > 0 && npcIntersects[0].distance <= 2.5) {\n                        npc.mesh.position.y = npcIntersects[0].point.y;\n                    }\n                    animateCharacter(npc.mesh, true, false);\n                });\n            }\n\n            if (activeGameType === 'rivals' && !inLobby) {\n                camera.position.set(player.position.x, player.position.y + 1.2, player.position.z);\n                const lookDist = 10;\n                camera.lookAt(\n                    player.position.x + lookDist * Math.sin(camAngleX) * Math.cos(camAngleY),\n                    player.position.y + 1.2 + lookDist * Math.sin(camAngleY),\n                    player.position.z + lookDist * Math.cos(camAngleX) * Math.cos(camAngleY)\n                );\n            } else {\n                const camDistance = 16;\n                camera.position.x = player.position.x + camDistance * Math.sin(camAngleX) * Math.cos(camAngleY);\n                camera.position.z = player.position.z + camDistance * Math.cos(camAngleX) * Math.cos(camAngleY);\n                camera.position.y = player.position.y + 3 + camDistance * Math.sin(camAngleY);\n                camera.lookAt(player.position.x, player.position.y + 2, player.position.z);\n            }\n\n            renderer.render(scene, camera);\n        }\n\n        animate();\n\n        window.addEventListener('resize', () => {\n            renderer.setSize(window.innerWidth, window.innerHeight);\n            camera.aspect = window.innerWidth / window.innerHeight;\n            camera.updateProjectionMatrix();\n        });\n    </script>\n</body>\n</html>\n"
setName(Text, "Roblox.html")
showWebpage()
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Ещё от lhazelhayesispeak

См. все

Вам также может понравиться

См. все
Реклама