Advertisement
Animescapetower

My Random Password Generator Script

Aug 15th, 2021 (edited)
3,942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.11 KB | None | 0 0
  1. --[[ Use this website for the password generator, or just use roblox studio. --
  2. --https://www.lua.org/cgi-bin/demo--
  3.  
  4. -- Animescapetowers/Kuroyami's Password Generator --
  5.  
  6. --
  7. --I just felt bored of trying to think of passwords so I just made this, this uses the "catch" variable which contains bunch of ----characters which are used to make your password, these letters are then seperated in a for loop just to make the password, as the --password generator is a random integer based generator meaning the pass you generate is always random, and not always the same meaning no one will get your password unless they got into a database full of passworss, or are so lucky.]]
  8.  
  9.  
  10. local catch = [[qwertyuiopasdfghjklzxcvbnm1234567890`-=[]';/.,\~!@#$%^&*(){}_+":><?|QWERTYUIOPLKJHGFDSAZXCVBNM]] -- you can put anything in here and it will generate a password
  11. local letters = {}
  12.  
  13.  
  14. --[[
  15.  
  16. if the length goes past 94 the password will be multiplied(large, and less variables) then the original meaning you will have to use the large, and less integers
  17. to simply modify your password after that point.
  18.  
  19. Still this is probably one of my best pass generators that I ever made without using an a.i, theres no slang except for a bunch of words which is used so that a hacker may never crack into your account.]]
  20.  
  21.  
  22. local sepmin, length, large, less = 0, 122, 2, 1 --< (Settings)
  23.  
  24.  
  25.  
  26.  
  27. local sub = string.sub
  28.  
  29. -- string seperator --
  30. for i = 0, #catch - sepmin, 1 do
  31.     i = (i + 1)
  32.     local d = (#catch - sepmin)
  33.     if i >= d then
  34.         i = d
  35.     end
  36.     local seperate = (catch):sub(i,i)
  37.     table.insert(letters, seperate)
  38. end
  39.  
  40. -- password generator --
  41.  
  42. local s = ""
  43. local l = length
  44. local max = #letters
  45. for i = 0, l, 1 do
  46.     if l >= max or l == max then
  47.         for g = 0, math.floor(max/((length/large)*less)), 1 do
  48.             if g >= max or g == max then
  49.                 g = max
  50.             end
  51.             local t = math.random(g, #letters)
  52.             local randomize = letters[t]
  53.             s = s..tostring(randomize)
  54.         end
  55.     else
  56.         local r = math.random(i, #letters)
  57.         if r ~= nil then
  58.             local randomize = letters[r]
  59.             s = s..randomize
  60.         end
  61.     end
  62. end
  63.  
  64. print("Generated Password: | "..s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement