Advertisement
BruceWplays

scrolltest

Oct 1st, 2022 (edited)
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. a = 84
  2. b = 84
  3. p = a / b
  4. cl = os.clock()
  5. clend = cl + 5
  6. cldiv = cl - clend
  7. clenddiv = clend - cl
  8. per = (os.clock() - cl) / clenddiv
  9. perold = per
  10. while true do
  11.     perold = per
  12.     per = (os.clock() - cl) / clenddiv
  13.     term.setCursorPos(1,1)
  14.     term.clear()
  15.     per = per ^ 2
  16.     per = ((per - 1) ^ 2) - 1
  17.     per = -per + 0.01
  18.     if per < perold then
  19.         per = perold
  20.     end
  21.     if per > 1 then
  22.         per = 1
  23.     end
  24.     print(math.floor((per * (b - a)) + a))
  25.     sleep()
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement