Advertisement
Bkbeast

Untitled

Dec 25th, 2021
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. --// localizations
  2.  
  3. local rconsoleprint = rconsoleprint;
  4. local rconsolename = rconsolename;
  5.  
  6. local math_random = math.random;
  7. local coroutine_wrap = coroutine.wrap;
  8. local task_wait = task.wait;
  9. local warn = warn;
  10.  
  11. --// define init variables
  12.  
  13. local code_count = 100000;
  14. local characters_list = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
  15. local character_list_length = #characters_list;
  16.  
  17. local redeem_remote = workspace.__THINGS.__REMOTES:WaitForChild("redeem merch code");
  18.  
  19. --// create working codes file
  20.  
  21. if not isfile("working_codes.txt") then
  22. writefile("working_codes.txt", "");
  23. end;
  24.  
  25. --// function to generate a random 10 character code
  26.  
  27. function generate_random_code()
  28. local code_string = "";
  29.  
  30. for index = 1, 10 do
  31. code_string = code_string .. characters_list[math_random(1, character_list_length)];
  32. end;
  33.  
  34. return "pet-" .. code_string;
  35. end;
  36.  
  37. --// stuff to output debug data to the rconsole
  38. local checked_amount = 0;
  39. local working_amount = 0;
  40.  
  41. local function output_debug_data()
  42. rconsolename("Huge Cat Generator | Checked: " .. checked_amount .. "/" .. code_count .. " | Working: " .. working_amount);
  43. end;
  44.  
  45. output_debug_data();
  46.  
  47. --// main bruteforce loop
  48.  
  49. for index = 1, code_count do
  50. local random_code = generate_random_code();
  51. local code_redeem = redeem_remote:InvokeServer({random_code});
  52. local response_status = code_redeem[1];
  53. local response_message = code_redeem[2];
  54.  
  55. warn(response_message); -- if you remove the wait(3) at the end of the loop, this will be "You are trying this too much"
  56.  
  57. checked_amount = checked_amount + 1;
  58.  
  59. if not response_status then
  60. rconsoleprint("@@RED@@");
  61. rconsoleprint("[NOT WORKING] ");
  62. rconsoleprint("@@WHITE@@");
  63. rconsoleprint(random_code .. "\n");
  64.  
  65. output_debug_data();
  66. else
  67. working_amount = working_amount + 1;
  68.  
  69. rconsoleprint("@@LIGHT_GREEN@@");
  70. rconsoleprint("[WORKING] ");
  71. rconsoleprint("@@WHITE@@");
  72. rconsoleprint(random_code .. "\n");
  73.  
  74. appendfile("working codes.txt", random_code .. "\n");
  75.  
  76. output_debug_data();
  77. end;
  78.  
  79. wait(3);
  80. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement