squidingtin

terminal

Jan 9th, 2026
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(function ($) {
  2.  
  3.   // -------------------------
  4.   // Sounds
  5.   // -------------------------
  6.   const sounds = {
  7.     key: new Audio("https://cdn.shopify.com/s/files/1/0655/3541/0376/files/keyclick.wav?v=1726250442"),
  8.     error: new Audio("https://cdn.shopify.com/s/files/1/0655/3541/0376/files/errorsound.wav?v=1726251333")
  9.   };
  10.  
  11.   const credentials = [
  12.     { password: "LEERAM",  url: "https://indigopark.shop/cdn/shop/files/beginnings.png" },
  13.     { password: "YEILM",   url: "https://indigopark.shop/cdn/shop/files/caged.png" },
  14.     { password: "MORAMOO", url: "https://indigopark.shop/cdn/shop/files/closeddoor.png" },
  15.     { password: "RILLRY",  url: "https://indigopark.shop/cdn/shop/files/stage.png" }
  16.   ];
  17.  
  18.   function playSound(type) {
  19.     const sound = sounds[type];
  20.     if (!sound) return;
  21.     sound.currentTime = 0;
  22.     sound.play().catch(() => {});
  23.   }
  24.  
  25.   function onKeyPress(e) {
  26.     e.preventDefault();
  27.     if ($(this).hasClass("active")) return;
  28.  
  29.     const screen = $(".screen");
  30.     if (screen.text().length >= 7) return playSound("key");
  31.  
  32.     screen.append($(this).text());
  33.     window.tries++;
  34.     updateFlasher();
  35.     playSound("key");
  36.     $(this).addClass("active");
  37.   }
  38.  
  39.   function onKeyRelease() {
  40.     $(this).removeClass("active");
  41.   }
  42.  
  43.   function onSubmitPress(e) {
  44.     e.preventDefault();
  45.     if (!$(this).hasClass("active")) {
  46.       validateEntry();
  47.       $(this).addClass("active");
  48.     }
  49.   }
  50.  
  51.   function onSubmitRelease() {
  52.     $(this).removeClass("active");
  53.   }
  54.  
  55.   function updateFlasher() {
  56.     $(".flasher").css(
  57.       window.tries <= 1
  58.         ? { left: window.tries * 55 + "px" }
  59.         : { left: "20px", display: "block" }
  60.     );
  61.   }
  62.  
  63.   function validateEntry() {
  64.     if (window.tries < 1) return;
  65.     checkPassword();
  66.     $(".screen").text("");
  67.     window.tries = 0;
  68.     $(".flasher").hide();
  69.     $(".submit-button").removeClass("active");
  70.   }
  71.  
  72.   function checkPassword() {
  73.     const input = $(".screen").text();
  74.     for (const entry of credentials) {
  75.       if (input === entry.password) {
  76.         $(".success").show().delay(5000).fadeOut(0);
  77.         window.location.href = entry.url;
  78.         return;
  79.       }
  80.     }
  81.  
  82.     $(".error-notification").show().delay(1000).fadeOut(0);
  83.     playSound("error");
  84.   }
  85.  
  86.   // Init
  87.   window.tries = 0;
  88.   $(".key").on("mousedown touchstart", onKeyPress);
  89.   $(".key").on("mouseup touchend", onKeyRelease);
  90.   $(".submit-button").on("mousedown touchstart", onSubmitPress);
  91.   $(".submit-button").on("mouseup touchend", onSubmitRelease);
  92.  
  93. });
  94.  
Advertisement
Add Comment
Please, Sign In to add comment