Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- term.clear()
- term.setCursorPos(1,1)
- if not args[1] then
- print("Usage: screensaver <text> [text] [text] etc.")
- write("Random Fact Thing: ")
- tip = math.random(1,10)
- if tip == 1 then print("Try using -u or -l instead of one text!")
- elseif tip == 2 then print("Try the program secret/alongtimeago!")
- elseif tip == 3 then print("Try putting a (regular) monitor and a wither skeleton skull in a crafting table!")
- elseif tip == 4 then print("Try erroring this program again like this for another fact thing!")
- elseif tip == 5 then print("These fact things are an easter egg! Shhh!")
- elseif tip == 6 then print("Pumpkins make good headgear, no angry endermen!")
- elseif tip == 7 then print("This program has a few secrets...")
- elseif tip == 8 then print("Sometimes the main menu of Minecraft sometimes says 'Minceraft'!")
- elseif tip == 9 then print("There are 10 random fact things in total.")
- elseif tip == 10 then print("I'm getting bored of typing these.")
- elseif tip == 11 then print("This fact thing will never show up. Minecraft has a splash screen like this.") end
- return
- end
- numb1 = 1
- numb2 = 0
- lower = false
- upper = false
- while args[numb1] ~= nil do
- if args[numb1] == "-u" and lower ~= true then
- upper = true
- elseif args[numb1] == "-l" and upper ~= true then
- lower = true
- end
- numb2 = numb2 + string.len(args[numb1])
- numb1 = numb1 + 1
- end
- numb3 = 1
- local function screensaver()
- local w,h = term.getSize()
- term.setCursorPos(math.random(w-numb2),math.random(h))
- term.setTextColour(2^math.random(14))
- while args[numb3] ~= nil and args[numb3] ~= "-u" and args[numb3] ~= "-l" and args[1] ~= "credits" do
- if upper == true then
- args[numb3] = string.upper(args[numb3])
- elseif lower == true then
- args[numb3] = string.lower(args[numb3])
- end
- term.write(args[numb3].." ")
- numb3 = numb3 + 1
- end
- if args[1] == "credits" then
- term.setCursorPos(1,1)
- print("Coded by: Shnupbups100")
- print("Code originally by: Kingdaro")
- print("FORUMS post wIth idea: Cranium")
- print("LOVElY mOd by: Dan200 and Cloudy")
- print("Umbrellas.")
- print("(yes, there's a hidden message in there)")
- sleep(8)
- os.reboot()
- end
- numb3 = 1
- end
- while true do
- screensaver()
- os.startTimer(0.05)
- event, p1, p2, p3 = os.pullEvent()
- if event ~= "timer" then
- term.clear()
- term.setCursorPos(1,1)
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment