Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cmenu = document.createElement("p"); document.body.appendChild(cmenu); cmenu.outerHTML=`<div hidden id="xyncmd"><div style="color:white;background:black; width: 700px;height: 400px;"><a>⠀Command Prompt (Black Market)</a><div>————————————————————————————————————————————</div><div>Cameron Windows [Version 10.0.19044.1766]</div><div>(c) Cameron Corporation. All rights reserved.</div>
- ⠀
- <div style="font-size:50; color:green;"><big id="output"></big></div></div><div id="divinput" style="background:black;color:white;width: 700px;">⠀>⠀<input id="cmdinput" style="background:black;color:white;width: 670px;" placeholder="Enter command here..."></div></div>`;
- var cmd = document.getElementById("xyncmd").outerHTML;
- // Make the DIV element draggable:
- function dragElement(elmnt) {
- var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
- if (document.getElementById(elmnt.id + "header")) {
- // if present, the header is where you move the DIV from:
- document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
- } else {
- // otherwise, move the DIV from anywhere inside the DIV:
- elmnt.onmousedown = dragMouseDown;
- }
- function dragMouseDown(e) {
- e = e || window.event;
- e.preventDefault();
- // get the mouse cursor position at startup:
- pos3 = e.clientX;
- pos4 = e.clientY;
- document.onmouseup = closeDragElement;
- // call a function whenever the cursor moves:
- document.onmousemove = elementDrag;
- }
- function elementDrag(e) {
- e = e || window.event;
- e.preventDefault();
- // calculate the new cursor position:
- pos1 = pos3 - e.clientX;
- pos2 = pos4 - e.clientY;
- pos3 = e.clientX;
- pos4 = e.clientY;
- // set the element's new position:
- elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
- elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
- }
- function closeDragElement() {
- // stop moving when mouse button is released:
- document.onmouseup = null;
- document.onmousemove = null;
- }
- };
- window.addEventListener("keydown",checkKeyPressed,false)
- function checkKeyPressed(evt) {
- if (evt.keyCode == "13") {
- testforcmd();
- };
- };
- window.addEventListener("keyup",checkKeyPressedd,false)
- function checkKeyPressedd(evt) {
- if (evt.keyCode == "88") {
- showcmd();
- };
- };
- function showcmd() { document.getElementById("xyncmd").outerHTML = `<div id="xyncmd"><div style="color:white;background:black; width: 700px;height: 400px;"><a>⠀Command Prompt (Black Market)</a><div>————————————————————————————————————————————</div><div>Cameron Windows [Version 10.0.19044.1766]</div><div>(c) Cameron Corporation. All rights reserved.</div><div>(i) Type help for known commands.</div>
- ⠀
- <div style="font-size:50; color:green;"><big id="output"></big></div></div><div id="divinput" style="background:black;color:white;width: 700px;">⠀>⠀<input id="cmdinput" style="background:black;color:white;width: 670px;" placeholder="Enter command here..."></div></div>`; };
- function testforcmd() { var command = document.getElementById("cmdinput").value; if (command == "help") { document.getElementById("output").innerHTML = `Current Commands: help | addmoney | darkmodeon | darkmodeoff | close`; document.getElementById("cmdinput").value=""; return; }; if (command == "darkmodeon") { document.getElementsByClassName("row")[0].style = "background: #333"; document.getElementsByClassName("panel-body")[0].style = "background: #444"; document.getElementById("cmdinput").value=""; darkmodeon(); return }; if (command == "darkmodeoff") { document.getElementsByClassName("row")[0].style = "background: #eee"; document.getElementsByClassName("panel-body")[0].style = "background: #eee"; document.getElementById("cmdinput").value=""; darkmodeoff(); return; }; if (command == "close") { document.getElementById("xyncmd").outerHTML=`<div hidden id="xyncmd"><div style="color:white;background:black; width: 700px;height: 400px;"><a>⠀Command Prompt (Black Market)</a><div>————————————————————————————————————————————</div><div>Cameron Windows [Version 10.0.19044.1766]</div><div>(c) Cameron Corporation. All rights reserved.</div>
- ⠀
- <div style="font-size:50; color:green;"><big id="output"></big></div></div><div id="divinput" style="background:black;color:white;width: 700px;">⠀>⠀<input id="cmdinput" style="background:black;color:white;width: 670px;" placeholder="Enter command here..."></div></div>`; document.getElementById("cmdinput").value=""; return; }; if (command.replace("addmoney ","") >= 0) { var finalcash = command.replace("addmoney ",""); gainMoney(Number(finalcash)); document.getElementById("output").innerHTML = `Successfully added `+command.replace("addmoney ","")+` to your money.`; document.getElementById("cmdinput").value=""; }; }; function darkmodeon() { document.getElementsByClassName("panel-body")[1].style="background:#444;"; document.getElementsByClassName("panel panel-default")[1].style="background:#444;";document.body.style=document.body.style+";color:#9f9;background:#333;"; };
Add Comment
Please, Sign In to add comment