EmeraldSlash

Code Cracker Script [ONLY FOR NUMBERS]

Mar 1st, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. -- code breaker script (hopefully this works)
  2. -- this is probably inefficient, but idc
  3. -- EmeraldSlash, 3/3/16
  4.  
  5. local passwordLength = 4 -- how long the code is that you're trying to crack
  6. local passHasToBePasswordLength = true -- if false, the script simply adds 1 until it is code (E.G 1,2,3,4, this does not support things like 0001), if true, it has to be the length of passwordLength (E.G 1000,1001,1002)
  7.  
  8. function checkCode(code)
  9.     if codeWorks then   -- code in here for seeing if code works, E.G, 'if script.PassWord.Value == code then' (code is a string value)
  10.         return true
  11.     else
  12.         return false
  13.     end
  14. end
  15.  
  16. if passHasToBePasswordLength == true then
  17.     local code = ""
  18.     for i = 1,passwordLength do
  19.         if i < 10 then
  20.             code = "000" ..i
  21.         elseif i < 100 then
  22.             code = "00" ..i
  23.         elseif i < 1000 then -- add more of these if your password length is bigger than 4
  24.             code = "0" ..i
  25.         end
  26.         if checkCode(code) == true then
  27.             print("Found code! It was '" ..code.. "'")
  28.             break
  29.         end
  30.     end
  31. else
  32.     local code = ""
  33.     for i = 1,passwordLength do
  34.         if checkCode(code) == true then
  35.             print("Found code! It was '" ..code.. "'")
  36.             break
  37.         end
  38.     end
  39. end
Add Comment
Please, Sign In to add comment