Advertisement
Rayjolt

Untitled

Apr 29th, 2017
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. local digits = {1,2,3,4,5,6,8,9}
  2. local target = {8,8,8,5,4,2,4,3,4,2,1,4,6,4,2,5,5,2,9,9,8,9,1,1,1,1,8,9,5,2,9,2,6,2,8,4,3,1,9,8,8,5,8,9,6,3,4,6,6,4}
  3. local length = #target
  4.  
  5. local function isTargetTime(time)
  6.     math.randomseed(time)
  7.     for i = 1, length do
  8.         if digits[math.random(8)] ~= target[i] then
  9.             return false
  10.         end
  11.     end
  12.     return true
  13. end
  14.  
  15. local ct = os.time()
  16. while ct > 1 do
  17.     if ct % 100000 == 0 then
  18.         print(ct)
  19.     end
  20.     if isTargetTime(ct) then
  21.         print("found: " .. ct)
  22.         break
  23.     end
  24.     ct = ct - 1
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement