Advertisement
Guest User

lol

a guest
Feb 19th, 2017
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.01 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Project CrackRBLX
  3. // @version 0.2 Pre-Alpha
  4. // @description BREAK ROBLOX!
  5. // @author NUKES4ALL
  6. // @match https://www.roblox.com/*
  7. // @grant GM_setValue
  8. // @grant GM_getValue
  9. // @namespace www.youtube.com/c/IggyKillerMinecraftGaming
  10. // ==/UserScript==
  11. var PC = this;
  12. var s = "<div class='divider'>&nbsp;</div><div class='label-checkmark'><span class='icon-checkmark-white-bold'></span></div><span>Item Owned</span>";
  13. var m = "<li ng-repeat='item in assetsListContent.assetItems.data.Data.Items' class='list-item item-card ng-scope' ng-class='{'place-item':currentData.category.name=='Places'}'><div class='item-card-container'><a ng-href='https://www.roblox.com/The-Major-s-Helmet-item?id=566779193' class='item-card-link' href='https://www.roblox.com/The-Major-s-Helmet-item?id=566779193'><div class='item-card-thumb-container'><div ng-hide='item.Product.SerialNumber==null' class='item-serial-number ng-binding ng-hide'>#</div><img ng-src='https://t5.rbxcdn.com/b40f05455b6d53fd5a32dce0e1949415' thumbnail='item.Thumbnail' image-retry='' class='item-card-thumb ng-isolate-scope' src='https://t5.rbxcdn.com/b40f05455b6d53fd5a32dce0e1949415'><div class='item-expire-time-label text-overflow ng-binding ng-hide' ng-hide='item.UserItem.RentalExpireTime==null'>Exp: </div><span ng-show='item.AssetRestrictionIcon' ng-class=''icon-'+item.AssetRestrictionIcon.CssTag+'-label'' class='icon-null-label'></span></div><div class='text-overflow item-card-name ng-binding' title='The Major’s Helmet'>The Major’s Helmet</div></a><!-- ngIf: item.Item.AudioUrl --><div class='text-overflow item-card-creator'><span class='xsmall text-label'>By</span> <a class='xsmall text-overflow text-link ng-binding' ng-href='https://www.roblox.com/users/1/profile/' ng-hide='assetsListContent.assetItems.data.Data.PageType!=='favorites'&amp;&amp;currentData.category.name=='Places'&amp;&amp;(currentData.subcategory.name=='My VIP Servers'||currentData.subcategory.name=='Other VIP Servers')&amp;&amp;staticData.isOwnPage' href='https://www.roblox.com/users/1/profile/'>ROBLOX</a> <a class='xsmall text-overflow text-link ng-binding ng-hide' ng-href='' ng-show='assetsListContent.assetItems.data.Data.PageType!=='favorites'&amp;&amp;(currentData.subcategory.name=='My VIP Servers'||currentData.subcategory.name=='Other VIP Servers')'></a></div><div class='item-card-price'><span class='icon-robux-16x16 ng-hide' ng-show='item.HasPrice'></span> <span class='text-robux ng-binding ng-hide' ng-show='itemHasPrice'></span> <span class='text-label' ng-hide='item.HasPrice'><!-- ngIf: item.Product.NoPriceText.length>0 --><span ng-if='item.Product.NoPriceText.length>0' ng-class='{'text-robux':item.Product.NoPriceText==='Free'}' class='ng-binding ng-scope'>Offsale</span><!-- end ngIf: item.Product.NoPriceText.length>0 --></span></div></div></li></span> <span class='text-label' ng-hide='item.HasPrice'><!-- ngIf: item.Product.NoPriceText.length>0 --><!-- end ngIf: item.Product.NoPriceText.length>0 --></span></div></div></li>";
  14. var t = "<span class='icon-robux-16x16' ng-show='item.HasPrice'></span> <span class='text-robux ng-binding' ng-show='item.HasPrice'>90</span> <span class='text-label ng-hide' ng-hide='item.HasPrice'><!-- ngIf: item.Product.NoPriceText.length>0 --></span>";
  15. var Robux = window.localStorage.getItem("Robux");
  16. var Name = window.localStorage.getItem("UserNamePCRBLX");
  17. var subbed = window.localStorage.getItem("Subbed");
  18. var Ver = window.localStorage.getItem("PCRBLX_Version");
  19. var CurVer = "1.0.2";
  20. var CrackedThangs = window.localStorage.getItem("Cracked");
  21. var NumInv = window.localStorage.getItem("NumInv");
  22. var disRbx = false;
  23.  
  24. if(Ver){
  25. if(Ver == CurVer){
  26. console.log("PCRBLX is up-to-date");
  27. } else {
  28. window.localStorage.setItem("PCRBLX_Version", CurVer);
  29. alert("Project CrackRBLX was updated!");
  30. alert("New Version: "+CurVer);
  31. }
  32. } else {
  33. window.localStorage.setItem("PCRBLX_Version", CurVer);
  34. Ver = window.localStorage.getItem("PCRBLX_Version");
  35. }
  36.  
  37. if(window.localStorage.getItem("AwaitingFormat")){
  38. if(window.localStorage.getItem("AwaitingFormat") == "true"){
  39. if(Roblox.NumberFormatting){
  40. if(document.getElementById("game-detail-page")){
  41. window.localStorage.setItem("Robux", Roblox.NumberFormatting.abbreviatedFormat(parseFloat(Robux)));
  42. Robux = window.localStorage.getItem("Robux");
  43. window.localStorage.setItem("AwaitingFormat", "false");
  44. }
  45. }
  46. }
  47. }
  48.  
  49. if(Name) {
  50. console.log();
  51. }else{
  52. alert("Project CrackRBLX Loaded.");
  53. alert("Project CrackRBLX made by NUKES4ALL, Taking credit for Project CrackRBLX will result in a Copyright Claim to be issued. You've been warned.");
  54. var WantsName = window.prompt("Hello There! What would you like me to call you?");
  55. window.localStorage.setItem("UserNamePCRBLX", WantsName);
  56. Name = window.localStorage.getItem("UserNamePCRBLX");
  57. alert("Hello, " + Name + ", Welcome to Project CrackRBLX!");
  58. }
  59.  
  60. if(NumInv) {
  61. console.log();
  62. }else{
  63. window.localStorage.setItem("NumInv", 0);
  64. }
  65.  
  66. if(window.localStorage.getItem("gotn")){
  67. console.log();
  68. }else{
  69. window.localStorage.setItem("gotn", false);
  70. }
  71.  
  72. if(CrackedThangs){
  73. console.log();
  74. }else{
  75. window.localStorage.setItem("Cracked", "LL");
  76. }
  77.  
  78. checkSub = function(){
  79. if(window.localStorage.getItem("Subbed") == "true"){
  80. return true;
  81. } else {
  82. return false;
  83. }
  84. };
  85.  
  86. lsSet = function(x, val){
  87. window.localStorage.setItem(x, val);
  88. };
  89.  
  90. getStor = function(s){
  91. return window.localStorage.getItem(s);
  92. };
  93.  
  94. updateStorage = function(name, store){
  95. [store] = window.localStorage.getItem(name);
  96. };
  97.  
  98. getBoughtItems = function(){
  99. console.log("Called");
  100. var i;
  101. for(i = 0; i < 2000; i++){
  102. if(getStor("CrackedItem"+i)){
  103. console.log("It exists");
  104. if(document.URL.includes("catalog/"+getStor("CrackedItem"+i)) === true){
  105. console.log("This is the right page!");
  106. var item = document.getElementsByClassName('PurchaseButton')[0];
  107. var buy = document.getElementById('confirm-btn');
  108. document.getElementsByClassName("item-name-container")[0].children[1].innerHTML = document.getElementsByClassName("item-name-container")[0].children[1].innerHTML + s;
  109. item.removeAttribute("class");
  110. item.parentElement.removeChild(item);
  111. }
  112. }
  113. }
  114. };
  115.  
  116. if(getStor("CrackedNumber")){
  117. console.log("Player has bought sht");
  118. } else {
  119. window.localStorage.setItem("CrackedNumber", 0);
  120. }
  121.  
  122. lel = function(cmd){
  123. cmd = window.prompt("Project CrackRBLX Command Bar");
  124. if (cmd == "SetRobux"){
  125. if (disRbx === true){
  126. disRbx = false;
  127. var newrbx = window.prompt("Please enter in a new balance!");
  128. window.localStorage.setItem("Robux", newrbx);
  129. Robux = window.localStorage.getItem("Robux");
  130. document.getElementById("nav-robux-amount").innerHTML = Robux;
  131. document.getElementById("nav-robux-balance").innerHTML = Robux;
  132. } else if (disRbx === false) {
  133. var nolrbx = window.prompt("Please enter in a new balance!");
  134. window.localStorage.setItem("Robux", nolrbx);
  135. Robux = window.localStorage.getItem("Robux");
  136. document.getElementById("nav-robux-amount").innerHTML = Robux;
  137. document.getElementById("nav-robux-balance").innerHTML = Robux;
  138. }
  139. } else if (cmd == "DisableRobux") {
  140. disRbx = true;
  141. } else if (cmd == "EnableRobux") {
  142. disRbx = false;
  143. } else if (cmd == "DevClrData") {
  144. localStorage.clear();
  145. alert("Cleared Data! Reloading page!");
  146. location.reload();
  147. } else if (cmd == "Youtube") {
  148. window.open('https://www.youtube.com/channel/UCM55CtF967ECwPUS5N4I52Q?sub_confirmation=1');
  149.  
  150. } else if (cmd == "Details") {
  151. alert(
  152. "Project CrackRBLX by Home RBLX V0.0.2 Pre-Alpha"
  153. );
  154. }
  155. };
  156.  
  157. function loadjscssfile(filename, filetype){
  158. if (filetype=="js"){ //if filename is a external JavaScript file
  159. var fileref=document.createElement('script');
  160. fileref.setAttribute("type","text/javascript");
  161. fileref.setAttribute("src", filename);
  162. }
  163. else if (filetype=="css"){ //if filename is an external CSS file
  164. var filerefl=document.createElement("link");
  165. filerefl.setAttribute("rel", "stylesheet");
  166. filerefl.setAttribute("type", "text/css");
  167. filerefl.setAttribute("href", filename);
  168. }
  169. if (typeof fileref!="undefined")
  170. document.getElementsByTagName("head")[0].appendChild(fileref);
  171. }
  172.  
  173.  
  174. if (disRbx === false) {
  175. if (Robux){
  176. document.getElementById("nav-robux-amount").innerHTML = Robux;
  177. document.getElementById("nav-robux-balance").innerHTML = Robux;
  178. } else {
  179. if(getStor("AwaitingFormat") == "true"){
  180. if(document.getElementById("game-detail-page")){
  181. var erm = window.prompt("Please enter in your balance.");
  182. window.localStorage.setItem("Robux", Roblox.NumberFormatting.abbreviatedFormat(Number(erm)));
  183. Robux = window.localStorage.getItem("Robux");
  184. }
  185. } else {
  186. if(document.getElementById("game-detail-page")){
  187. var e = window.prompt("What would you like your balance to be?");
  188. window.localStorage.setItem("Robux", Roblox.NumberFormatting.abbreviatedFormat(Number(e)));
  189. Robux = window.localStorage.getItem("Robux");
  190. document.getElementById("nav-robux-amount").innerHTML = Robux;
  191. document.getElementById("nav-robux-balance").innerHTML = Robux;
  192. } else {
  193. var e = window.prompt("What would you like your balance to be?");
  194. window.localStorage.setItem("Robux", e);
  195. Robux = window.localStorage.getItem("Robux");
  196. window.localStorage.setItem("AwaitingFormat", "true");
  197. alert("We're sorry! We were unable to reach the formatting service, so please go on a game page to make your balance visible");
  198. }
  199. }
  200. }
  201. }
  202.  
  203. var PC = {
  204. confirmSub: function(sessionName){
  205. if(window.sessionStorage.getItem(sessionName)){
  206. window.localStorage.setItem("Subbed", "true");
  207. }
  208. }
  209. };
  210.  
  211. var PCa = [
  212. ChangeRbx = function ChangeRbx(a, userchange){
  213. if(userchange === true){
  214. var newrbx = window.prompt("Please enter in a new balance!");
  215. if(document.getElementById("game-detail-page")){
  216. window.localStorage.setItem("Robux", Roblox.NumberFormatting.abbreviatedFormat(parseFloat(newrbx)));
  217. Robux = window.localStorage.getItem("Robux");
  218. window.localStorage.setItem("AwaitingFormat", "false");
  219. }
  220. } else {
  221. if(document.getElementById("game-detail-page")){
  222. window.localStorage.setItem("Robux", Roblox.NumberFormatting.abbreviatedFormat(parseFloat(a)));
  223. Robux = window.localStorage.getItem("Robux");
  224. window.localStorage.setItem("AwaitingFormat", "false");
  225. }
  226. }
  227. },
  228. PCalert = function alert(msg, prompt){
  229. alert("[Project CrackRBLX]: " + msg);
  230. },
  231. log = function log(msg, error){
  232. if(error){
  233. console.log("[Project CrackRBLX][ERROR]: " + msg);
  234. return msg;
  235. } else {
  236. console.log("[Project CrackRBLX]: " + msg);
  237. }
  238. },
  239. PCprompt = function prompt(msg){
  240. return window.prompt("[Project CrackRBLX]: "+msg);
  241. },
  242. createSession = function createSession(ses, val){
  243. return window.localStorage.setItem(ses, val);
  244. },
  245. terminateSession = function terminateSession(ses){
  246. window.localStorage.removeItem(ses);
  247. },
  248. this.updateStat = function updateStat(stat, ses, name){
  249. if(window.localStorage.getItem(ses)){
  250. window.localStorage.setItem(stat, window.localStorage.getItem(ses));
  251. if(name){
  252. [name] = ses;
  253. }
  254. } else {
  255. var err = PC.log("updateStat couldnt find Session!");
  256. PC.alert("An error has occured! Please report this error: " + err);
  257. }
  258. },
  259. getStat = function getStat(stat){
  260. if(window.localStorage.getItem(stat)){
  261. return window.localStorage.getItem(stat);
  262. } else {
  263. var err = PC.log("getStat couldnt find the Stat: " + stat);
  264. PC.alert("An error has occured! Please report this error: " + err);
  265. }
  266. },
  267. isStat = function isStat(stat, what){
  268. if(window.localStorage.getItem(stat) == what){
  269. return true;
  270. } else {
  271. return false;
  272. }
  273. },
  274. promptSubscribe = function promptSubscribe(){
  275. if(window.localStorage.getItem("Subscribed")){
  276. if(window.localStorage.getItem("Subscribed") == "false"){
  277. var ytwin = window.open("https://www.youtube.com/channel/UCM55CtF967ECwPUS5N4I52Q?sub_confirmation=1", "SubToNilam", "width=200,height=100");
  278. ytwin.document.body.setAttribute("onload", "function(){ if(document.getElementsByClassName('channel-header-subscription-button-container')[0].children[0]['data-is-subscribed']){ alert('You are already subscribed! Thank You!'); window.localStorage.setItem('issubed', 'true'); } else { document.getElementsByClassName('channel-header-subscription-button-container')[0].children[0].addEventListener('click', function(){ alert('Thank You for Subscribing!'); window.localStorage.setItem('issubed', 'true'); }); }");
  279. var i;
  280. for(i = 0; i < 25; i++){
  281. setTimeout(function(){ console.log(i); }, 4000);
  282. if(i >= 25){
  283. if(ytwin){
  284. if(ytwin.localStorage.getItem("issubbed") == "true"){
  285. ytwin.close();
  286. PC.alert("Thank you for subscribing to NUKES4ALL! Subscription Progress: 50%");
  287. ytwin = window.open("https://www.youtube.com/channel/UCM55CtF967ECwPUS5N4I52Q?sub_confirmation=1", "SubToNilam", "width=200,height=100");
  288. ytwin.document.body.setAttribute("onload", "function(){ if(document.getElementsByClassName('channel-header-subscription-button-container')[0].children[0]['data-is-subscribed']){ alert('You are already subscribed! Thank You!'); window.localStorage.setItem('issubed', 'true'); } else { document.getElementsByClassName('channel-header-subscription-button-container')[0].children[0].addEventListener('click', function(){ alert('Thank You for Subscribing!'); window.localStorage.setItem('issubed', 'true'); }); }");
  289. var x;
  290. for(x = 0; x < 25; x++){
  291. setTimeout(function(){ console.log(i); }, 4000);
  292. if(i >= 25){
  293. if(ytwin){
  294. if(ytwin.localStorage.getItem("issubbed") == "true"){
  295. ytwin.close();
  296. PC.alert("Thank you for subscribing to NUKES4ALL! Subscription Progress: COMPLETE!");
  297. PC.createSession("Sub", "true");
  298. PC.updateStat("Subscribed", "Sub");
  299. PC.terminateSession("Sub");
  300. }
  301. }
  302. }
  303. }
  304. }
  305. }
  306. }
  307. }
  308. }
  309. }
  310. },
  311. displayError = function displayError(error){
  312. var err = PC.log(error, "");
  313. PC.alert("ERROR: A error has occured! Please report the following message: "+err);
  314. },
  315. createStorage = function createStorage(stname, val){
  316. if(window.localStorage.getItem(stname)){
  317. var err = PC.log("createStorage tried to create a existing storage! DETAILS: name='"+stname+"' value='"+val+"'", "");
  318. PC.alert("ERROR: A error has occured! Please report the following message: "+err);
  319. } else {
  320. return window.localStorage.setItem(stname, val);
  321. }
  322. },
  323. terminateStorage = function terminateStorage(stname){
  324. if(window.localStorage.getItem(stname)){
  325. window.localStorage.removeItem(stname);
  326. } else {
  327. PC.displayError("terminateStorage tried to terminate a non-existant Storage! Details: "+stname);
  328. }
  329. }];
  330.  
  331.  
  332. function checkSubBtns(){
  333. if(document.getElementsByClassName('yt-uix-button-subscription-container')[0]){
  334. document.getElementsByClassName('yt-uix-button-subscription-container')[0].addEventListener('click', actSub);
  335. }
  336. }
  337.  
  338. function hehe(){
  339. console.log(PCa);
  340. }
  341. document.getElementById("nav-blog").parentElement.innerHTML = "<div class='g-ytsubscribe' data-channelid='UCM55CtF967ECwPUS5N4I52Q' data-layout='default' data-count='hidden'></div>";
  342. document.getElementById("nav-shop").parentElement.innerHTML = "<div class='g-ytsubscribe' data-channelid='UCM55CtF967ECwPUS5N4I52Q' data-layout='default' data-count='hidden'></div>";
  343. var btn = document.createElement("IMG");
  344. btn.setAttribute("src", "http://i.imgur.com/LlQM9GO.png");
  345. btn.setAttribute("style", "position: fixed; top: 8px;");
  346. btn.setAttribute("onclick", "lel();");
  347. document.getElementsByClassName("navbar-right")[0].children[0].appendChild(btn);
  348.  
  349. function PurchaseItem(){
  350. var item = document.getElementsByClassName('PurchaseButton')[0];
  351. var buy = document.getElementById('confirm-btn');
  352. var itemStat = window.location.href.slice(31);
  353. var itemPrice = document.getElementsByClassName("text-robux-lg")[0].innerHTML;
  354. var itemImage = document.getElementsByClassName('thumbnail-span')[0].children[0].src;
  355. var itemName = document.getElementsByClassName('item-name-container')[0].children[0].innerHTML;
  356. window.localStorage.setItem("CrackedItem"+getStor("CrackedNumber"), itemStat);
  357. window.localStorage.setItem("CrackedItemPrice"+getStor("CrackedNumber"), itemPrice);
  358. window.localStorage.setItem("CrackedItemImage"+getStor("CrackedNumber"), itemImage);
  359. window.localStorage.setItem("CrackedItemName"+getStor("CrackedNumber"), itemName);
  360. window.localStorage.setItem("CrackedNumber", Number(getStor("CrackedNumber"))+1);
  361. document.getElementsByClassName("item-name-container")[0].children[1].innerHTML = document.getElementsByClassName("item-name-container")[0].children[1].innerHTML + s;
  362. item.removeAttribute("class");
  363. item.parentElement.removeChild(item);
  364. document.getElementsByClassName('alert-success')[0].setAttribute("style", "top: 35px");
  365. setTimeout(function(){ document.getElementsByClassName('alert-success')[0].setAttribute("style", "top: -8px"); }, 3000);
  366. }
  367.  
  368. if(window.location.href.slice(31) == CrackedThangs){
  369. var item = document.getElementsByClassName('PurchaseButton')[0];
  370. var buy = document.getElementById('confirm-btn');
  371. document.getElementsByClassName("item-name-container")[0].children[1].innerHTML = document.getElementsByClassName("item-name-container")[0].children[1].innerHTML + s;
  372. item.removeAttribute("class");
  373. item.parentElement.removeChild(item);
  374. }
  375.  
  376. if(document.URL.includes('inventory') === true){
  377. for(i=0;i<Number(getStor('CrackedNumber'));i++){
  378. if(getStor('CrackedItem'+i)){
  379. var span = document.createElement("SPAN");
  380. span.innerHTML = m;
  381. document.getElementById('assetsItems').appendChild(span);
  382. span.children[0].children[0].children[0].children[0].children[1].src = getStor('CrackedItemImage'+i);
  383. span.children[0].children[0].children[0].children[1].innerHTML = getStor('CrackedItemName'+i);
  384. span.children[0].children[0].children[0].children[1].title = getStor('CrackedItemName'+i);
  385. span.getElementsByClassName('item-card-price')[0].removeChild(span.getElementsByClassName('item-card-price')[0].getElementsByClassName('text-label')[0]);
  386. span.getElementsByClassName('item-card-price')[0].children[0].setAttribute('class', 'icon-robux-16x16');
  387. span.getElementsByClassName('item-card-price')[0].children[1].setAttribute('class', 'text-robux ng-binding');
  388. span.getElementsByClassName('item-card-price')[0].children[1].innerHTML = getStor('CrackedItemPrice'+i);
  389. span.getElementsByClassName('item-card-link')[0].href = "http://www.roblox.com/catalog/"+getStor('CrackedItem'+i);
  390. }
  391. }
  392. }
  393.  
  394. function start(){
  395. if (document.URL.includes("catalog") === true){
  396. console.log("E");
  397. var item = document.getElementsByClassName('PurchaseButton')[0];
  398. var buy = document.getElementById('confirm-btn');
  399. var price = document.getElementsByClassName('text-robux-lg')[0];
  400. item.addEventListener('click', PurchaseItem);
  401. getBoughtItems();
  402. console.log("F");
  403. } else if(document.URL.includes("promocodes") === true) {
  404. var id = document.getElementById("pin");
  405. var gotnil = window.localStorage.getItem("GotNilam");
  406. Roblox.GameCard.redeemCode = function(){
  407. console.log("HUE");
  408. if(id.value == "Nilam1s4Realz"){
  409. console.log("HUE HUE");
  410. if (gotnil == "false"){
  411. console.log("HUE HUE HYPE");
  412. var bar = document.getElementById("success").removeAttribute("style");
  413. alert("PCRBLX CODE REDEEMED");
  414. document.getElementById("SuccessMessage").innerHTML = "Redeemed Free Robux Reset!";
  415. var newrbx = window.prompt("Please enter in a new balance!");
  416. window.localStorage.setItem("GotNilam", "true");
  417. window.localStorage.setItem("AwaitingFormat", "true");
  418. window.localStorage.setItem("Robux", newrbx);
  419. Robux = window.localStorage.getItem("Robux");
  420. }
  421. }
  422. };
  423. }
  424. }
  425.  
  426.  
  427. loadjscssfile("https://apis.google.com/js/platform.js", "js"); //dynamically load and add this .js file
  428. start();
  429. setTimeout(checkSubBtns, 2000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement