daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --day/month/year + time past
  2. d = 01
  3. m = 00
  4. y = 00
  5. D = ""
  6. M = ""
  7. Y = ""
  8. Dd = ""
  9. Md = ""
  10. Yd = ""
  11. seconds = 1
  12. mins = 0
  13. hours = 0
  14. days = 1
  15. O1 = "Enabled"
  16. O2 = "Disabled"
  17. O3 = "Disabled"
  18. O4 = "Enabled"
  19. O5 = "Enabled"
  20. O6 = "Disabled"
  21. O7 = "Enabled"
  22.  
  23. start = false
  24.  
  25.  
  26. while start == false do
  27. shell.run("clear")
  28. print("Welcome To Freakouts Better Clock!")
  29. print("To change settings choose the options bellow")
  30. print("When your ready type 'Start' to continue")
  31. print("")
  32. print("")
  33. print("")
  34. print("Would you like your clock formatted (EG. 1, 4 or Start")
  35. print(" 1. 12 Hour "..O1.. "")
  36. print(" 2. 12 Hour + Is it morning/night? "..O2.. "")
  37. print(" 3. 24 Hour "..O3.. "")
  38. print(" 4. Date Logged in "..O4.. "")
  39. print(" 5. Days Been Since (Date Logged in) "..O5.. "")
  40. print(" 6. Real Time Since (Date Logged in) "..O6.. "")
  41. print(" 7. Current Date "..O7.. "")
  42. print(" 8. Default")
  43. write(":")
  44.  
  45. option = io.read()
  46.  
  47. if option == "Start" then
  48. start = true
  49.  
  50. elseif option == "start" then
  51. start = true
  52.  
  53. elseif option == "START" then
  54. start = true
  55.  
  56. elseif option == "1" then
  57. if O1 == "Enabled" then
  58. O1 = "Disabled"
  59. else
  60. O1 = "Enabled"
  61. end
  62.  
  63. elseif option == "2" then
  64. if O2 == "Enabled" then
  65. O2 = "Disabled"
  66. else
  67. O2 = "Enabled"
  68. end
  69.  
  70. elseif option == "3" then
  71. if O3 == "Enabled" then
  72. O3 = "Disabled"
  73. else
  74. O3 = "Enabled"
  75. end
  76.  
  77. elseif option == "4" then
  78. if O4 == "Enabled" then
  79. O4 = "Disabled"
  80. else
  81. O4 = "Enabled"
  82. end
  83.  
  84. elseif option == "5" then
  85. if O5 == "Enabled" then
  86. O5 = "Disabled"
  87. else
  88. O5 = "Enabled"
  89. end
  90.  
  91. elseif option == "6" then
  92. if O6 == "Enabled" then
  93. O6 = "Disabled"
  94. else
  95. O6 = "Enabled"
  96. end
  97.  
  98. elseif option == "7" then
  99. if O7 == "Enabled" then
  100. O7 = "Disabled"
  101. else
  102. O7 = "Enabled"
  103. end
  104.  
  105. elseif option == "8" then
  106. O1 = "Enabled"
  107. O2 = "Disabled"
  108. O3 = "Disabled"
  109. O4 = "Enabled"
  110. O5 = "Enabled"
  111. end
  112.  
  113. end
  114.  
  115. while true do
  116. shell.run("clear")
  117.  
  118. --changing time to 01 not just 1/1/1
  119. if d < 10 then
  120. D = 0+0
  121. else
  122. D = ""
  123. end
  124.  
  125. if m < 10 then
  126. M = 0+0
  127. else
  128. M = ""
  129. end
  130.  
  131. if y < 10 then
  132. Y = 0+0
  133. else
  134. Y = ""
  135. end
  136.  
  137. --changing day to days
  138. if d == 1 then
  139. Dd = "Day"
  140. else
  141. Dd = "Days"
  142. end
  143.  
  144. if m == 1 then
  145. Md = "Month"
  146. else
  147. Md = "Months"
  148. end
  149.  
  150. if y == 1 then
  151. Yd = "Year"
  152. else
  153. Yd = "Years"
  154. end
  155.  
  156. if O4 == "Enabled" then
  157. print("You logged in on the: 01/00/00")
  158. end
  159.  
  160. if O7 == "Enabled" then
  161. print("The current Date is : "..D..""..d.."/"..M..""..m.."/"..Y..""..y.."")
  162. end
  163.  
  164. if O5 == "Enabled" then
  165. --More accurate time thing
  166. print("")
  167. print(""..days.. " " ..Dd..", "..m.. " " ..Md.." & "..y.. " " ..Yd.." have past in Minecraft")
  168. end
  169.  
  170. if O6 == "Enabled" then
  171. --Real Time Past
  172. print(""..seconds.." Seconds, "..mins.." Mins & "..hours.." has past in Reality")
  173. print("")
  174. end
  175.  
  176. --shell.run("clear")
  177. local nTime = os.time()
  178.  
  179. --12 hour
  180. if O1 == "Enabled" then
  181. print("The time is " ..textutils.formatTime( nTime, false) )
  182. end
  183.  
  184.  
  185. --24 hour
  186. if O3== "Enabled" then
  187. print("The time is " ..textutils.formatTime( nTime, true) )
  188. end
  189.  
  190. --24 hour + morning/night
  191. if O2== "Enabled" then
  192. if nTime <=12 then
  193. print("The time is " ..textutils.formatTime( nTime, true).. " Morning")
  194. else
  195. print("The time is " ..textutils.formatTime( nTime, true).. " Night")
  196. end
  197. end
  198.  
  199. --decimal place time
  200. --print("Time is " ..nTime.. " 24hour")
  201.  
  202. --one day has past
  203. if nTime <= 0.009 then
  204. d = d+1
  205. days = days+1
  206. end
  207.  
  208. --been a month
  209. if d >31 then
  210. d = 1
  211. m = m+1
  212. end
  213.  
  214. --been a year
  215. if m > 12 then
  216. m = 1
  217. y = y+1
  218. end
  219.  
  220. seconds = seconds+1
  221. if seconds >=60 then
  222. seconds = 1
  223. mins = mins+1
  224. end
  225.  
  226. if mins >= 60 then
  227. mins = 0
  228. hours = hours+1
  229. end
  230. sleep(0.9)
  231. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top