Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- side = "back" --This is the side of the monitor
- mon = peripheral.wrap(side)
- mon.clear()
- mon.setTextScale(3)
- if fs.exists("DezSignData") == false then
- print("Settings not found. Loading Editor")
- shell.run("Edit")
- end
- file = fs.open("DezSignData", "r")
- local Day = tonumber(file.readLine())
- local Record = tonumber(file.readLine())
- file.close()
- mon.setCursorPos(1,1)
- mon.write("Welcome to Dez Corp.")
- mon.setCursorPos(1,3)
- mon.write("Your safety is important")
- mon.setCursorPos(1,4)
- mon.write(" to us.")
- mon.setCursorPos(1,6)
- mon.write("Days since last")
- mon.setCursorPos(1,9)
- mon.write("Previous Record : " .. Record .. " Days")
- local DoneAdd = false
- while true do
- if (os.time() < 0.200) then
- if (DoneAdd == false) then
- Day = Day + 1
- file = fs.open("DezSignData", "w")
- file.writeLine(tostring(Day))
- file.writeLine(tostring(Record))
- file.close()
- DoneAdd = true
- end
- else
- DoneAdd = false
- end
- mon.setCursorPos(1,7)
- mon.write("Nuclear Meltdown : " .. Day)
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement