Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Settings
- mon = peripheral.wrap("top") --Screen Side
- mon.setTextScale(3) --Text Size
- mon.setBackgroundColor(2)
- mon.setTextColor(32768)
- local monitor, touch
- local monitorLocation, myTime
- anger = 0
- maxanger = 0
- strtpos = 20 --Start position on screen
- speed = 0.1 --Scroll Speed (Seconds)
- text = "Welcome to Reign Station" --Displayed Text
- myTime = os.startTimer(speed)
- function writeLog(text)
- print(text)
- end
- monitorLocation = "top"
- monitor = peripheral.wrap(monitorLocation)
- function determineLength(myString)
- local theLength = 0
- if string.len(myString) > maxNameLength then
- theLength = maxNameLength + buttonPadding * 2
- else
- theLength = string.len(myString) + buttonPadding * 2
- end
- return theLength
- end
- pos = strtpos
- poslimit = 0 - strtpos
- mon.setBackgroundColor(2)
- mon.setTextColor(32768)
- while true do
- event, completed = os.pullEvent()
- if event == "monitor_touch" then
- anger = anger + 10
- maxanger = maxanger + 10
- --os.startTimer(4)
- elseif event == "timer" then
- if anger < 1 then
- maxanger = 0
- end
- if anger > 0 then
- anger = anger - 1
- mon.clear()
- mon.setCursorPos(1, 1)
- mon.setBackgroundColor(16384)
- if maxanger < 20 then
- mon.write("Stop Poking ME!")
- --anger = 0
- end
- if maxanger > 19 and maxanger < 30 then
- mon.write("Cut it out!")
- --anger = 0
- end
- if maxanger > 29 and maxanger < 50 then
- mon.setTextScale(1)
- mon.write("You're really making me mad!")
- --anger = 0
- end
- if maxanger > 49 and maxanger < 100 then
- mon.setTextScale(1)
- mon.write("I'm sorry Dave, I can\'t let you do that.")
- --anger = 0
- end
- if maxanger > 99 then
- mon.setTextScale(3)
- mon.write("EXTERMINATE!!!")
- --anger=0
- end
- elseif anger < 1 then
- maxanger = 0
- mon.setBackgroundColor(2)
- mon.setTextScale(3)
- mon.clear()
- mon.setCursorPos(pos, 1)
- mon.write(text)
- if pos == poslimit then
- pos = strtpos
- else
- pos = pos - 1
- end
- end
- end
- if completed == myTime then
- myTime = os.startTimer(speed)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment