Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --day/month/year + time past
- d = 01
- m = 00
- y = 00
- D = ""
- M = ""
- Y = ""
- Dd = ""
- Md = ""
- Yd = ""
- seconds = 1
- mins = 0
- hours = 0
- days = 1
- O1 = "Enabled"
- O2 = "Disabled"
- O3 = "Disabled"
- O4 = "Enabled"
- O5 = "Enabled"
- O6 = "Disabled"
- O7 = "Enabled"
- start = false
- while start == false do
- shell.run("clear")
- print("Welcome To Freakouts Better Clock!")
- print("To change settings choose the options bellow")
- print("When your ready type 'Start' to continue")
- print("")
- print("")
- print("")
- print("Would you like your clock formatted (EG. 1, 4 or Start")
- print(" 1. 12 Hour "..O1.. "")
- print(" 2. 12 Hour + Is it morning/night? "..O2.. "")
- print(" 3. 24 Hour "..O3.. "")
- print(" 4. Date Logged in "..O4.. "")
- print(" 5. Days Been Since (Date Logged in) "..O5.. "")
- print(" 6. Real Time Since (Date Logged in) "..O6.. "")
- print(" 7. Current Date "..O7.. "")
- print(" 8. Default")
- write(":")
- option = io.read()
- if option == "Start" then
- start = true
- elseif option == "start" then
- start = true
- elseif option == "START" then
- start = true
- elseif option == "1" then
- if O1 == "Enabled" then
- O1 = "Disabled"
- else
- O1 = "Enabled"
- end
- elseif option == "2" then
- if O2 == "Enabled" then
- O2 = "Disabled"
- else
- O2 = "Enabled"
- end
- elseif option == "3" then
- if O3 == "Enabled" then
- O3 = "Disabled"
- else
- O3 = "Enabled"
- end
- elseif option == "4" then
- if O4 == "Enabled" then
- O4 = "Disabled"
- else
- O4 = "Enabled"
- end
- elseif option == "5" then
- if O5 == "Enabled" then
- O5 = "Disabled"
- else
- O5 = "Enabled"
- end
- elseif option == "6" then
- if O6 == "Enabled" then
- O6 = "Disabled"
- else
- O6 = "Enabled"
- end
- elseif option == "7" then
- if O7 == "Enabled" then
- O7 = "Disabled"
- else
- O7 = "Enabled"
- end
- elseif option == "8" then
- O1 = "Enabled"
- O2 = "Disabled"
- O3 = "Disabled"
- O4 = "Enabled"
- O5 = "Enabled"
- end
- end
- while true do
- shell.run("clear")
- --changing time to 01 not just 1/1/1
- if d < 10 then
- D = 0+0
- else
- D = ""
- end
- if m < 10 then
- M = 0+0
- else
- M = ""
- end
- if y < 10 then
- Y = 0+0
- else
- Y = ""
- end
- --changing day to days
- if d == 1 then
- Dd = "Day"
- else
- Dd = "Days"
- end
- if m == 1 then
- Md = "Month"
- else
- Md = "Months"
- end
- if y == 1 then
- Yd = "Year"
- else
- Yd = "Years"
- end
- if O4 == "Enabled" then
- print("You logged in on the: 01/00/00")
- end
- if O7 == "Enabled" then
- print("The current Date is : "..D..""..d.."/"..M..""..m.."/"..Y..""..y.."")
- end
- if O5 == "Enabled" then
- --More accurate time thing
- print("")
- print(""..days.. " " ..Dd..", "..m.. " " ..Md.." & "..y.. " " ..Yd.." have past in Minecraft")
- end
- if O6 == "Enabled" then
- --Real Time Past
- print(""..seconds.." Seconds, "..mins.." Mins & "..hours.." has past in Reality")
- print("")
- end
- --shell.run("clear")
- local nTime = os.time()
- --12 hour
- if O1 == "Enabled" then
- print("The time is " ..textutils.formatTime( nTime, false) )
- end
- --24 hour
- if O3== "Enabled" then
- print("The time is " ..textutils.formatTime( nTime, true) )
- end
- --24 hour + morning/night
- if O2== "Enabled" then
- if nTime <=12 then
- print("The time is " ..textutils.formatTime( nTime, true).. " Morning")
- else
- print("The time is " ..textutils.formatTime( nTime, true).. " Night")
- end
- end
- --decimal place time
- --print("Time is " ..nTime.. " 24hour")
- --one day has past
- if nTime <= 0.009 then
- d = d+1
- days = days+1
- end
- --been a month
- if d >31 then
- d = 1
- m = m+1
- end
- --been a year
- if m > 12 then
- m = 1
- y = y+1
- end
- seconds = seconds+1
- if seconds >=60 then
- seconds = 1
- mins = mins+1
- end
- if mins >= 60 then
- mins = 0
- hours = hours+1
- end
- sleep(0.9)
- end
Add Comment
Please, Sign In to add comment