Advertisement
Guest User

Diep Custom Background

a guest
Jul 27th, 2018
1,339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Diep Custom Background
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  Custom backgrounds for diep.io.
  6. // @author       Adasba
  7. // @match        http://diep.io
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12.     'use strict';
  13.  
  14.     var img = document.createElement('img');
  15.     img.src = "https://cdn.discordapp.com/attachments/358671241059762177/472473892259233796/b279af2.jpg";
  16.     img.style = "z-index:-1;width:100%;height:100%;position:absolute;top:0px;left:0px";
  17.     document.getElementsByTagName('body')[0].appendChild(img);
  18.  
  19.  
  20.  
  21.     var shaderButton = document.createElement('button');
  22.     document.getElementsByTagName('body')[0].appendChild(shaderButton);
  23.     var bg = true;
  24.     shaderButton.style = "position:absolute; top:10px; left:10px;";
  25.     shaderButton.innerHTML = "Toggle background";
  26.     shaderButton.onclick = function() {
  27.         bg = !bg;
  28.         input.set_convar('ren_background', bg);
  29.     }
  30.  
  31.  
  32.     var shaderInput = document.createElement('input');
  33.     document.getElementsByTagName('body')[0].appendChild(shaderInput);
  34.     shaderInput.style = "position:absolute; top:30px; left:10px;";
  35.     function loop1() {
  36.         img.src = shaderInput.value;
  37.     }
  38.     setInterval(loop1, 1000);
  39. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement