Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. local Start = tick()
  2. Array = {}
  3. ArrayN = 0
  4. ArrayLimit = 1200 -- Change this value to improve speed.
  5. PreviousTick = tick()
  6. Previous = 1200
  7. ArrayLimitChange = 50 -- Change this value to change big of an arraylimit change you want
  8. Current = 0
  9.  
  10.  
  11. for i = 0, 4000000, 1 do
  12.     if i % 3 == 0 or i % 5 == 0 then
  13.         Array[ArrayN + 1] = i
  14.         ArrayN = ArrayN + 1
  15.     end
  16.     if #Array == ArrayLimit then
  17.         Current = Current + ArrayLimit
  18.         print(table.concat(Array, ";"))
  19.         if (tick() - PreviousTick) > 1 then -- This makes script adapt to your computer Capability.
  20.             if Previous > Current then
  21.                 ArrayLimit = ArrayLimit + ArrayLimitChange
  22.             else
  23.                 ArrayLimit = ArrayLimit - ArrayLimitChange
  24.             end
  25.             Previous = Current
  26.             Current = 0
  27.             PreviousTick = tick()
  28.         end
  29.         ArrayN = 0
  30.         Array = {}
  31.         wait()
  32.     end
  33. end
  34.  
  35. print(table.concat(Array, ";"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement