Advertisement
Guest User

Facebook

a guest
Dec 17th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.41 KB | None | 0 0
  1. --[[
  2.     Facebook 1.3 for CraftOS 6.2+
  3. --]]
  4.  
  5. version = fs.open("CraftOS/Version","r")
  6.  if version then
  7.   version1 = version.readLine()
  8.  end
  9.  
  10. if version1 > "6.2" then
  11. else
  12.  error("Please update your Computer to run this app.")
  13. end
  14.  
  15. function login()
  16.  term.setTextColour(colours.white)
  17.  term.setBackgroundColour(colours.black)
  18.  term.clear()
  19.  term.setCursorPos(1, 1)
  20.  write ("Enter your username: ")
  21.  name = read ()
  22. end
  23.  
  24. function facebook()
  25.  term.setBackgroundColour(colours.white)
  26.  term.clear()
  27.  term.setCursorPos(1, 1)
  28.  shell.run("CraftOS/StatusBar")
  29.  if term.isColour() then
  30.   term.setBackgroundColour(colours.blue)
  31.  else
  32.   term.setBackgroundColour(colours.black)
  33.  end
  34.  print ("                      Facebook                     ")
  35.  term.setBackgroundColour(colours.white)
  36.  term.setTextColour(colours.black)
  37.  print ("  ")
  38.  print ("Welcome "..name.."! Here you can meet new people")
  39.  print ("or talk to your friends around the world. Using")
  40.  print ("this app you can join our server by typing")
  41.  print ("'join chat' or 'quit' to close the app. This app")
  42.  print ("will get updates including new features or bug")
  43.  print ("fixes. Facebook and CraftCo 2014.")
  44.  print ("  ")
  45.  print ("Commands:")
  46.  print ("          open twitter - Opens the Twitter section")
  47.  print ("          join chat    - Joins Facebook chat")
  48.  print ("          quit         - Closes the Facebook app")
  49.  print ("  ")
  50.  write ("What would you like to do? ")
  51.  answer = read ()
  52.  if answer == "join chat" then
  53.   shell.run("chat join facebook "..name)
  54.  end
  55.  if answer == "quit" then
  56.   sleep(0.5)
  57.   term.setBackgroundColour(colours.black)
  58.   term.clear()
  59.   term.setCursorPos(1, 1)
  60.  end
  61.  if answer == "" then
  62.  term.setTextColour(colours.white)
  63.   facebook()
  64.  end
  65.  if answer == "open twitter" then
  66.   term.clear()
  67.   term.setCursorPos(1, 1)
  68.   term.setTextColour(colours.white)
  69.   shell.run("CraftOS/StatusBar")
  70.   term.setBackgroundColour(colours.lightBlue)
  71.   print ("Twitter(C) 2014 (Facebook Addon)                   ")
  72.   term.setBackgroundColour(colours.white)
  73.   term.setCursorPos(1, 4)
  74.   term.setBackgroundColour(colours.lightBlue)
  75.   print ("CraftCo: (Verified)                                ")
  76.   print ("Facebook 1.3 is verified to work with CraftOS 9    ")
  77.   print ("no compatibility changes needed at all! Talking    ")
  78.   print ("about CraftOS 9, Beta 4 contains some really nice  ")
  79.   print ("features!                                          ")
  80.   term.setBackgroundColour(colours.white)
  81.   print ("  ")
  82.   term.setBackgroundColour(colours.lightBlue)
  83.   print ("TaiG9:                                             ")
  84.   print ("TaiG9 1.1 will support CraftOS 9 Beta 4 and the    ")
  85.   print ("release if we're lucky, things are looking good    ")
  86.   print ("at the moment! @Evasi0n8                           ")
  87.   term.setBackgroundColour(colours.white)
  88.   print ("  ")
  89.   term.setBackgroundColour(colours.lightBlue)
  90.   print ("Evasi0n8:                                          ")
  91.   print ("@TaiG9 How's the CraftOS 9 Jailbreak looking? and  ")
  92.   print ("you wouldn'y mind us using an exploit of your's to ")
  93.   print ("release our own again would you? :P                ")
  94.   term.setTextColour(colours.black)
  95.   term.setBackgroundColour(colours.white)
  96.   close = read()
  97.   if answer == "" then
  98.    term.setTextColour(colours.white)
  99.    facebook()
  100.   else
  101.    term.setTextColour(oclours.white)
  102.    facebook()
  103.   end
  104.  end
  105. end
  106.  
  107. login()
  108. facebook()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement