Advertisement
KyleCypher

Super Mario YWOT Builder

Oct 22nd, 2019
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function (b) {
  2.     var d = b('<div style="text-shadow: 0px 0px 5px #000000;position:fixed;width:300px;padding:4px;z-index:10;color:white;background:url(https://i.imgur.com/hxcxJ3Y.gif);background-size: cover;background-repeat: no-repeat;background-position-x: center;border-radius:3px;box-shadow:#222 1px 1px 5px 1px;font: 11pt/12pt sans-serif;pointer-events:none;"><p style="margin:3px;font:12pt/16pt monospace;text-align:center;">Super Mario Builder Alpha Version 0.4</p><p style="margin:4px;"><br>1. Works like the art blocks script</br><p style="margin:4px;"><p style="margin:4px;"><b></b></p><p style="margin:4px;float:right;"><i>~Poopman</i></p></div>').appendTo("body");
  3.     d.css({
  4.         top: b(window).height() / 2 - d.height() / 2,
  5.         left: b(window).width() / 2 - d.width() / 2
  6.     });
  7.     b(document).one("mousedown.colibri-jslink", function () {
  8.         d.fadeOut(100, function () {
  9.             d.remove()
  10.  
  11.         })
  12.     })
  13. })(window.jQuery);
  14.  
  15. $("body").append("<style>" +
  16.  
  17.     ".m-block-dud {color: transparent;background-image: url(https://i.imgur.com/6Dxur3k.png);background-size: cover}" +
  18.     ".m-block-stone {color: transparent;background-image: url(https://i.imgur.com/14EboDy.png);background-size: cover}" +
  19.     ".m-bush-edge-right {color: transparent;background-image: url(https://i.imgur.com/gOBRvl6.png);background-size: cover}" +
  20.     ".m-bush-edge-left {color: transparent;background-image: url(https://i.imgur.com/UUa6ANH.png);background-size: cover}" +
  21.     ".m-grass {color: transparent;background-image: url(https://i.imgur.com/ABZ9SiT.jpg);background-size: cover}" +
  22.     ".m-grass-edge-right {color: transparent;background-image: url(https://i.imgur.com/t3ptWaJ.png);background-size: cover}" +
  23.     ".m-grass-edge-left {color: transparent;background-image: url(https://i.imgur.com/Ah7hKhO.png);background-size: cover}" +
  24.     ".m-dirt {color: transparent;background-image: url(https://i.imgur.com/xGOqoS3.jpg);background-size: cover;}" +
  25.     ".m-coin {color: transparent;background-image: url(https://i.imgur.com/Wrq208j.gif);background-size: contain;background-repeat: no-repeat;} " +
  26.     ".m-lucky {color: transparent;background-image: url(https://i.imgur.com/n25g2Jw.gif);background-size: contain;background-repeat: no-repeat;}" +
  27.     ".m-mario {background-image:url(https://i.imgur.com/786205S.png);color: transparent;background-size: cover;background-repeat: no-repeat;background-position-x: center;}" +
  28.     ".m-start{color: transparent}div#m-target {position: fixed;width: 10px;height: 16px;background:transparent;background-size: cover;background-position-x: center;}" +
  29.     ".m-invisible-platform{color:transparent;background:#bbb}" +
  30.     ".m-invisible-kill{color: transparent;background-image: url(https://i.imgur.com/7s36bmo.jpg);background-size: cover}" +
  31.     ".m-bush {color: transparent;background-image: url(https://i.imgur.com/JtJv50x.png);background-size: cover;background-position-x: center;}" +
  32.     ".m-goomba {color: transparent;background-image: url(https://i.imgur.com/izaqvY0.png);background-size: contain;background-repeat: no-repeat;background-position-x: center;background-position-y: bottom;}" +
  33.     ".m-lava {color: transparent;background-image: url(https://i.imgur.com/S10Q75m.gif);background-size: contain;background-repeat: no-repeat;background-position-x: center;background-position-y: bottom;}" +
  34.     ".m-invisible-dud {color: transparent;background-image: url(https://i.imgur.com/6Dxur3k.png);background-size: cover;opacity:0.5}" +
  35.     '.m-pipe-vertical-top-left  {color: transparent;background-image: url(https://i.imgur.com/qD9qHUU.png);background-size: cover;background-position-x: center;}'+
  36.     '.m-pipe-vertical-top-right  {color: transparent;background-image: url(https://i.imgur.com/g0r1e0W.png);background-size: cover;background-position-x: center;}'+
  37.     '.m-pipe-vertical-left      {color: transparent;background-image: url(https://i.imgur.com/mj3zKaX.png);background-size: cover;background-position-x: center;}'+
  38.     '.m-pipe-vertical-right      {color: transparent;background-image: url(https://i.imgur.com/AlCEKLe.png);background-size: cover;background-position-x: center;}'+
  39.     "</style>");
  40.  
  41.  
  42. setInterval(function () {
  43.     styleSheet();
  44. }, 1000)
  45.  
  46.  
  47.  
  48. function styleSheet() {
  49.     var blocks = "█▓▫▢⛹░◠▄▅╮╭▦▤xᴥ▣⣿╗╒│║".split("");
  50.     var classes = ["m-grass", "m-dirt", "m-coin", "m-lucky", "m-mario", "m-invisible-platform", "m-bush", "m-grass-edge-right", "m-grass-edge-left", "m-bush-edge-right", "m-bush-edge-left", "m-block-dud", "m-block-stone", "m-invisible-kill", "m-goomba", "m-invisible-dud","m-lava","m-pipe-vertical-top-right", "m-pipe-vertical-top-left", "m-pipe-vertical-left", "m-pipe-vertical-right"]
  51.  
  52.  
  53.  
  54.     for (i = 0; i < blocks.length; i++) {
  55.         $("." + classes[i]).removeClass(classes[i])
  56.         $("#unicode-topbar button:contains('" + blocks[i] + "'),.text-button:contains('" + blocks[i] + "'),td:contains('" + blocks[i] + "')").addClass(classes[i]);
  57.     }
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. }
  65.  
  66. (I = $("textarea")[0]).oninput = function () {
  67.     0 <= (V = I.value) & 10 > V && (I.value = $("#unicode-topbar button")[V].innerText)
  68. };
  69. $("body").append('<style>#unicode-sidebar .selected {background: blue;color: white;border: blue;}#unicode-topbar button { resize: none; width: 17px;height: 25px;display: inline;}#unicode-topbar li {display: inline-block;padding: 3px;}#artblocks li {float: left;text-decoration: none;width: 16px;height: 20px;display: block;padding: 21px;}#artblocks { padding-bottom: 50px;}#unicode-instructions {display: inline-block; margin-top: 50px; height: max-content; padding-bottom: 20px;}</style>')
  70. $("body").append('<div id="unicode-sidebar" style="position: fixed;top: 0;left: 0;display: block;width: 400px;height: 100%;background: #ddd;overflow-y: scroll;user-select: text;padding: 10px;font-family: monospace;"><div id="unicode-topbar" style="width: inherit;position: fixed;top: 0px;left:0px;display: block;height: 25px;background: #bbb;user-select: text;padding: 10px;font-family: monospace;"><ul><li>0:<button id="ta0" rows = 1 cols = 1 maxlength = 1>⛹</button></li><li>1:<button id="ta1" rows = 1 cols = 1 maxlength = 1>▅</button></li><li>2:<button id="ta2" rows = 1 cols = 1 maxlength = 1>█</button></li><li>3:<button id="ta3" rows = 1 cols = 1 maxlength = 1>▄</button></li><li>4:<button id="ta4" rows = 1 cols = 1 maxlength = 1>▓</button></li><li>5:<button id="ta5" rows = 1 cols = 1 maxlength = 1>╭</button></li><li>6:<button id="ta6" rows = 1 cols = 1 maxlength = 1>◠</button></li><li>7:<button id="ta7" rows = 1 cols = 1 maxlength = 1>╮</button></li><li>8:<button id="ta8" rows = 1 cols = 1 maxlength = 1>▦</button></li><li>9:<button id="ta9" rows = 1 cols = 1 maxlength = 1>▤</button></li></ul></div><div id="unicode-instructions"><h1>instructions</h1><p>Type 0-9 on your keyboard to draw. The top-bar corresponds with what will be written when typing 0-9. to change the top bar symboles, click next to the number you would want to change and then click on a symbole you want to replace it with.</p></div><ul id="artblocks"></ul></div>')
  71.  
  72. var artblocks = '▅█▄╭◠╮▦▤▢▫x░⛹ᴥ▣⣿╗╒│║'
  73. var desc = ["grass left", "grass", "grass right", "bush left", "bush", "bush right", "dud", "stone", "lucky", "coin", "kill", "invisible", "player start", "goomba", "invisible dud","lava","pipe vertical top right", " pipe vertical top left", "pipe vertical left", "pipe vertical right"]
  74. for (var i = 0; i < artblocks.length; i++) {
  75.     $("#artblocks").append('<li><button class="text-button">' + artblocks[i] + '</button>' + desc[i] + '</li>')
  76. }
  77. $("#unicode-topbar button").on("click", function () {
  78.     if ($(this).hasClass("selected")) {
  79.         $(this).removeClass("selected");
  80.     }
  81.     else {
  82.         $("#unicode-topbar .selected").removeClass("selected");
  83.         $(this).addClass("selected");
  84.         setblock();
  85.     }
  86. })
  87. $("#artblocks button").on("click", function () {
  88.     if ($(this).hasClass("selected")) {
  89.         $(this).removeClass("selected");
  90.     }
  91.     else {
  92.         $("#artblocks .selected").removeClass("selected")
  93.         $(this).addClass("selected");
  94.         setblock();
  95.     }
  96. })
  97. var setblock = function () {
  98.     if ($("#unicode-topbar .selected")[0] && $("#artblocks .selected")[0]) {
  99.         $("#unicode-topbar .selected")[0].innerText = $("#artblocks .selected")[0].innerText;
  100.     }
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement