make the full script with 10 functions please

merge it to this script

(function () {
  const SCREEN_WIDTH = window.screen.availWidth;
  const SCREEN_HEIGHT = window.screen.availHeight;
  const WIN_WIDTH = 250;
  const WIN_HEIGHT = 150;
  const MOVE_INTERVAL = 10; 
  const POPUP_INTERVAL = 10000; 

  const style = document.createElement('style');
  style.innerHTML = `
    .glitchText {
      animation: glitch 0.3s infinite alternate;
      display: inline-block;
      color: red;
    }
    @keyframes glitch {
      0%, 100% { transform: translate(0, 0); }
      50% { transform: translate(3px, 0); }
    }
    .emoji {
      position: absolute;
      font-size: 24px;
      pointer-events: none;
    }
    #timerPopup {
      position: fixed;
      top: 20px;
      right: 20px;
      background: white;
      border: 2px solid black;
      padding: 10px;
      z-index: 1000;
    }
    .shaky {
      animation: shake 0.5s infinite;
    }
    @keyframes shake {
      0% { transform: translate(1px, 1px) rotate(0deg); }
      50% { transform: translate(-1px, -1px) rotate(-1deg); }
      100% { transform: translate(1px, 1px) rotate(0deg); }
    }
  `;
  document.head.appendChild(style);

  function transformTextToBinaryAndCode(element) {
    element.childNodes.forEach(node => {
      if (node.nodeType === Node.TEXT_NODE) {
        const span = document.createElement('span');
        span.className = 'glitchText';
        let binaryText = '';
        for (const char of node.nodeValue) {
          binaryText += Math.random() > 0.2 ? `\`${char}\`` : '0101 ';
        }
        span.textContent = binaryText;
        node.replaceWith(span);
      } else if (node.nodeType === Node.ELEMENT_NODE) {
        transformTextToBinaryAndCode(node);
      }
    });
  }

  function createBouncingPopups() {
    const x = Math.random() * (SCREEN_WIDTH - WIN_WIDTH);
    const y = Math.random() * (SCREEN_HEIGHT - WIN_HEIGHT);

    const popup = window.open('', '_blank', `width=${WIN_WIDTH},height=${WIN_HEIGHT},left=${x},top=${y}`);
    if (!popup) return;

    popup.document.write('<img src="https://placekitten.com/200/100" alt="Popup Image">');
    popup.document.body.style.cssText = 'background: lightyellow; display: flex; align-items: center; justify-content: center;';

    let vx = 5, vy = 5;

    function movePopup() {
      if (popup.closed) return;
      const px = popup.screenX, py = popup.screenY;
      if (px <= 0 || px + WIN_WIDTH >= SCREEN_WIDTH) vx = -vx;
      if (py <= 0 || py + WIN_HEIGHT >= SCREEN_HEIGHT) vy = -vy;
      popup.moveBy(vx, vy);
      requestAnimationFrame(movePopup);
    }
    movePopup();
  }

  function addRandomEmojis() {
    const emoji = document.createElement('div');
    emoji.textContent = ['😀', '😂', '🥺', '😍'][Math.floor(Math.random() * 4)];
    emoji.className = 'emoji';
    emoji.style.top = `${Math.random() * window.innerHeight}px`;
    emoji.style.left = `${Math.random() * window.innerWidth}px`;
    document.body.appendChild(emoji);
    setTimeout(() => emoji.remove(), 3000);
  }

  function startTimerPopup() {
    const popup = document.createElement('div');
    popup.id = 'timerPopup';
    popup.textContent = "You've been smiled! Enter the password to stop.";
    const timer = document.createElement('div');
    popup.appendChild(timer);

    let timeRemaining = 600;

    function updateTimer() {
      if (timeRemaining > 0) {
        timer.textContent = `Time remaining: ${Math.floor(timeRemaining / 60)}:${('0' + timeRemaining % 60).slice(-2)}`;
        timeRemaining--;
        setTimeout(updateTimer, 1000);
      } else {
        document.body.removeChild(popup);
      }
    }
    updateTimer();

    const input = document.createElement('input');
    input.type = 'password';
    input.placeholder = 'Enter password';
    const button = document.createElement('button');
    button.textContent = 'Submit';
    button.onclick = () => {
      if (input.value === 'smile') {
        document.body.removeChild(popup);
      }
    };

    popup.appendChild(input);
    popup.appendChild(button);
    document.body.appendChild(popup);
  }

  function spamURLWithEmojis() {
    const emojis = ['😀', '😂', '🥺', '😍', '😎', '🤔', '😊', '👍'];
    setInterval(() => {
      const randomEmojis = Array.from({ length: 5 }, () => emojis[Math.floor(Math.random() * emojis.length)]).join('');
      window.location.hash = randomEmojis;
    }, 5000);
  }

  function screenShakeEffect() {
    document.body.classList.add('shaky');
    setTimeout(() => document.body.classList.remove('shaky'), 500);
  }

  function flashBackgroundColors() {
    const colors = ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff'];
    let index = 0;
    function changeBgColor() {
      document.body.style.backgroundColor = colors[index];
      index = (index + 1) % colors.length;
    }
    setInterval(changeBgColor, 3000);
  }

  function invertPageColors() {
    function invertColors() {
      document.body.style.filter = document.body.style.filter ? '' : 'invert(1)';
    }
    setInterval(invertColors, 10000);
  }

  function spinElements() {
    document.querySelectorAll('.glitchText').forEach(el => {
      el.style.transition = 'transform 0.5s';
      setInterval(() => {
        const angle = Math.random() * 360;
        el.style.transform = `rotate(${angle}deg)`;
      }, 2000);
    });
  }

  function changeTextColorRandomly() {
    const colors = ['red', 'blue', 'green', 'orange', 'purple'];
    document.querySelectorAll('.glitchText').forEach(el => {
      setInterval(() => {
        const color = colors[Math.floor(Math.random() * colors.length)];
        el.style.color = color;
      }, 2000);
    });
  }

  function addRandomBorders() {
    const styles = ['dashed', 'solid', 'double', 'dotted'];
    document.querySelectorAll('div').forEach(el => {
      el.style.border = `2px ${styles[Math.floor(Math.random() * styles.length)]} black`;
    });
  }

  function animateRandomSizes() {
    document.querySelectorAll('.glitchText').forEach(el => {
      setInterval(() => {
        const size = Math.random() * 2 + 1;
        el.style.transform = `scale(${size})`;
      }, 2000);
    });
  }

  function sprinkleStars() {
    const count = 30;
    for (let i = 0; i < count; i++) {
      const star = document.createElement('div');
      star.textContent = '*';
      star.style.cssText = `position: absolute; top: ${Math.random() * window.innerHeight}px; left: ${Math.random() * window.innerWidth}px; font-size: 16px; opacity: 0.8;`;
      document.body.appendChild(star);
      setTimeout(() => star.remove(), 5000);
    }
  }

  function rainEffect() {
    for (let i = 0; i < 10; i++) {
      const drop = document.createElement('div');
      drop.textContent = '|';
      drop.style.cssText = `position: absolute; top: ${Math.random() * 100}vh; left: ${Math.random() * 100}vw; font-size: 12px; color: #00f;`;
      document.body.appendChild(drop);
      setTimeout(() => drop.remove(), 3000);
    }
  }

  function addFloatingClock() {
    const clock = document.createElement('div');
    clock.style.cssText = 'position: fixed; bottom: 10px; right: 10px; background: #000; color: #fff; padding: 10px; z-index: 10000;';
    document.body.appendChild(clock);
    setInterval(() => {
      const date = new Date();
      clock.textContent = `${date.getHours()}:${('0'+date.getMinutes()).slice(-2)}:${('0'+date.getSeconds()).slice(-2)}`;
    }, 1000);
  }

  function generateRandomCodeSnippet() {
    const snippet = 'console.log("Sample code snippet: Hello World!");';
    const container = document.createElement('div');
    container.textContent = snippet;
    container.style.cssText = 'position: absolute; white-space: pre; background: #f0f0f0; padding: 10px; border: 1px solid black; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000;';
    document.body.appendChild(container);
    setTimeout(() => container.remove(), 8000);
  }

  function generateRandomTriangles() {
    const count = 10;
    for (let i = 0; i < count; i++) {
      const triangle = document.createElement('div');
      triangle.style.cssText = `
        width: 0;
        height: 0;
        position: absolute;
        top: ${Math.random() * SCREEN_HEIGHT}px;
        left: ${Math.random() * SCREEN_WIDTH}px;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 20px solid red;
      `;
      document.body.appendChild(triangle);
      setTimeout(() => triangle.remove(), 3000);
    }
  }

  function wiggleEffect() {
    document.querySelectorAll('.glitchText').forEach(el => {
      setInterval(() => {
        const x = Math.random() * 2 - 1;
        const y = Math.random() * 2 - 1;
        el.style.transform = `translate(${x}px, ${y}px)`;
      }, 100);
    });
  }

  function drawGridOverlay() {
    const grid = document.createElement('div');
    grid.style.cssText = 'position: fixed; top: 0; left: 0; right: 0; height: 100vh; pointer-events: none; background: repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(0,0,0,0.2) 19px, rgba(0,0,0,0.2) 20px), repeating-linear-gradient(-90deg, transparent, transparent 19px, rgba(0,0,0,0.2) 19px, rgba(0,0,0,0.2) 20px); z-index: 9999;';
    document.body.appendChild(grid);
  }

  function drawRandomCircles() {
    for (let i = 0; i < 5; i++) {
      const circle = document.createElement('div');
      circle.style.cssText = `position: absolute; width: 30px; height: 30px; border-radius: 50%; background-color: rgba(0, 0, 255, 0.3); top: ${Math.random() * SCREEN_HEIGHT}px; left: ${Math.random() * SCREEN_WIDTH}px;`;
      document.body.appendChild(circle);
      setTimeout(() => circle.remove(), 3000);
    }
  }

  function addRotatingSpirals() {
    const spirals = document.createElement('div');
    spirals.style.cssText = `
      position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; border: 5px solid black; border-radius: 50%; animation: spin 5s linear infinite; transform-origin: center; z-index: 2000; transform: translate(-50%, -50%);
    `;
    document.body.appendChild(spirals);
  }

  function randomBackgroundPatterns() {
    setInterval(() => {
      const patterns = ['url(https://via.placeholder.com/50)', 'url(https://via.placeholder.com/60)', 'url(https://via.placeholder.com/70)'];
      const pattern = patterns[Math.floor(Math.random() * patterns.length)];
      document.body.style.backgroundImage = pattern;
    }, 4000);
  }

  function showRandomMessages() {
    const messages = ['Hello!', 'Welcome!', 'JavaScript is fun!', 'Coding is amazing!'];
    const msg = document.createElement('div');
    msg.textContent = messages[Math.floor(Math.random() * messages.length)];
    msg.style.cssText = 'position: absolute; background: #ffffffaa; padding: 5px; border-radius: 5px; top: 10px; left: 10px; z-index: 2000;';
    document.body.appendChild(msg);
    setTimeout(() => msg.remove(), 3000);
  }

  transformTextToBinaryAndCode(document.body);
  setInterval(addRandomEmojis, 5000);
  setInterval(createBouncingPopups, POPUP_INTERVAL);
  startTimerPopup();
  spamURLWithEmojis();
  setInterval(screenShakeEffect, 7000);
  flashBackgroundColors();
  invertPageColors();
  spinElements();
  changeTextColorRandomly();
  addRandomBorders();
  animateRandomSizes();
  setInterval(sprinkleStars, 8000);
  setInterval(rainEffect, 10000);
  addFloatingClock();
  setInterval(generateRandomCodeSnippet, 12000);
  setInterval(generateRandomTriangles, 9000);
  wiggleEffect();
  drawGridOverlay();
  setInterval(drawRandomCircles, 9000);
  addRotatingSpirals();
  randomBackgroundPatterns();
  setInterval(showRandomMessages, 6000);
})();