Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ MackCode ]]--
- Author= "Mackan90096"
- Version = "1.0"
- function cls()
- term.clear()
- end
- function txtCol(colcode)
- term.setTextColor(colcode)
- end
- function bgCol(col)
- term.setBackgroundColor(colcode)
- end
- function bgcolc(colcode)
- term.setBackgroundColor(colcode)
- cls()
- end
- function getVer()
- print("MackCode Version "..Version)
- print("Author: "..Author)
- end
- function saveFile(filename, mode, text)
- local file = fs.open(filename, mode)
- file.write(text)
- file.close()
- end
- function del(filename)
- fs.delete(filename)
- end
- function size()
- w, h = term.getSize()
- end
- function cursor(x, y)
- term.setCursorPos(x,y)
- end
- function centerPrint(string, X, Y)
- size()
- term.setCursorPos(math.floor(w-string.len(string))/X, Y)
- print(string)
- end
- function EasterEgg(timeS)
- times = 0
- while true do
- if times <= timeS then
- txtCol(colors.black)
- bgcolc(colors.lime)
- centerPrint(tostring(times), 2,2)
- sleep(0.05)
- bgcolc(colors.yellow)
- centerPrint(tostring(times), 2,2)
- sleep(0.05)
- bgcolc(colors.blue)
- centerPrint(tostring(times), 2,2)
- sleep(0.05)
- bgcolc(colors.red)
- centerPrint(tostring(times), 2,2)
- sleep(0.05)
- bgcolc(colors.orange)
- centerPrint(tostring(times), 2,2)
- times = times+1
- else
- if time2 <= 2 then
- sleep(1)
- cls()
- bgcolc(colors.white)
- txtCol(colors.black)
- centerPrint("Thank you!", 2,2)
- sleep(1)
- centerPrint("For using MackCode", 2,4)
- time2 = time2 +1
- else
- times = 0
- EasterEgg()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment