Advertisement
__Tyler__

Roblox Name Sniper

Sep 13th, 2015
2,239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Join here: http://www.v3rmillion.net/member.php?action=register&referrer=3224
  2. /* For this to work go to http://api.roblox.com/ and paste this in */
  3. var Username = prompt("Enter names to check", "Separate each name with a space").split(" ");
  4. var WorkingNames = ["Created By Scripted on Vermillion.net"];
  5. var check = "";
  6. var i =0;
  7.  
  8. function SendData(){
  9.  
  10.         var xhr = ("XMLHttpRequest" in window) ? new XMLHttpRequest() : new ActiveXObject("Msxml3.XMLHTTP");
  11.     xhr.open("GET", 'http://api.roblox.com/users/get-by-username?username=' + Username[i], true);
  12.     xhr.onreadystatechange = function() {
  13.         if (xhr.readyState === 4) {
  14.             var serverResponse = xhr.responseText;
  15.  
  16.             if (serverResponse == "{\"success\":false,\"errorMessage\":\"User not found\"}") {
  17.                 console.log("The username " + Username[i-1] + " is not taken"); //i used this for debugging
  18.                 WorkingNames.push(Username[i-1]);
  19.             }else{
  20.                 console.log("Name was taken");
  21.             }
  22.         }
  23.     };
  24.     xhr.send(null);
  25. }
  26.  
  27. function LogNames(){
  28.         for (var i = 0; i < WorkingNames.length; i++) {
  29.         check = check + "\r\n "+  WorkingNames[i];
  30.         check = check.replace("undefined","");
  31.         }
  32. }
  33.  
  34. function Loop(){
  35.     setTimeout(function(){
  36.         if(i < Username.length){
  37.             SendData();
  38.             i++;
  39.             Loop();
  40.  
  41.         }else{
  42.             LogNames();
  43.             console.log("Your name snipes are:\r\n " +check + "\r\n WARNING: THIS BOT IS NOT CASE SENSITIVE SO SOME RESULTS MAY HAVE BEEN REMOVED FROM THE NAME SNIPE LIST.");
  44.             console.log("Please refresh the page, and paste the bot in to try again.");
  45.         }
  46.     },1000); // Change the speed here.
  47. }Loop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement