Advertisement
LazerAio

ATSV1

Mar 5th, 2022
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. term.setTextColour(colors.lime)
  2. term.clear()
  3. os.pullEvent = os.pullEventRaw
  4. print("ATS V1.0")
  5. local IT = 60
  6. local J = 0
  7. local LoopLimit = 20
  8. time = {}
  9. local L = 1
  10. local BL = 0
  11. while true do
  12. J = J + 1
  13. if J == LoopLimit then
  14. print("LoopLimit reached")
  15. print("REBOOT? [Y]")
  16. J = 0
  17. if read() == "Y" then
  18. os.reboot()
  19. end
  20. end
  21. print(os.date())
  22. sleep(1)
  23. term.setBackgroundColor(colors.black)
  24. term.clear()
  25. term.setCursorPos(1,1)
  26. if multishell.getCount() == 1 or multishell.getFocus() == 1 then
  27. term.setBackgroundColor(colors.red)
  28. print("New Task")
  29. shell.run("fg "..read())
  30. time[multishell.getFocus()] = 0
  31. sleep(0.5)
  32. else
  33. term.setBackgroundColor(colors.black)
  34. print("RUNNING")
  35. local TASKS = multishell.getCount()
  36. X = time[multishell.getFocus()]
  37. if X == nil then
  38. print(X)
  39. else
  40. time[multishell.getFocus()] = X+1
  41. print(time[multishell.getFocus()])
  42. print(x)
  43. if multishell.getFocus() == multishell.getCount() then
  44. sleep(IT - L)
  45. L = 1
  46. print("Reseting small loop")
  47. end
  48. if time[multishell.getFocus()] == IT then
  49. term.setBackgroundColor(colors.orange)
  50. print("LIMIT")
  51. if multishell.getFocus() == L then
  52. print("OK")
  53. else
  54. print("POSSIBLE TIME CHEAT DETECTED")
  55. print("WAITING A WHILE THEN FORCING WINDOW")
  56. sleep(IT/2)
  57. multishell.setFocus(1)
  58. sleep(0.5)
  59. multishell.setFocus(L)
  60. end
  61. if L == multishell.getCount() then
  62. L = 1
  63. print("Small loop reset")
  64. sleep(IT)
  65. end
  66. print("Next Task "..L)
  67. L = L + 1
  68. multishell.setFocus(1)
  69. sleep(3)
  70. multishell.setFocus(L)
  71. end
  72. end
  73. end
  74. end
  75.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement