Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chars = {"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","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"}
- local maxlength = 8
- local length = 1
- local uni = Instance.new("UnionOperation")
- function increment(t, ind)
- t[ind] = t[ind]+1
- if t[ind] > #chars then
- t[ind] = 1
- increment(t, ind-1)
- end
- end
- function check(t)
- local attempt = ""
- for i=1, #t do
- attempt = attempt .. chars[t[i]]
- end
- local __, status = pcall(function() local a = uni[attempt] end)
- if not status or not string.find(status, "is not a valid member") then
- print(attempt)
- wait(1)
- end
- end
- function checkOfLength(clength)
- local current = {}
- for i=1, clength do
- current[i] = 1
- end
- local maxattempts = math.pow(#chars, clength)
- local attempts = 1
- while attempts ~= maxattempts do
- increment(current, clength)
- check(current)
- attempts = attempts+1
- end
- print("FINISHED CHECKING OF LENGTH " .. clength)
- wait(1)
- end
- for k=1, maxlength do
- checkOfLength(k)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement