SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tpimg = paintutils.loadImage("file.img")
  2. btmimg = paintutils.loadImage("file2.img")
  3. --ws, err = http.websocket("put ip here")
  4. --if err ~= nil then
  5. --    print("OOPSIE WOOPSIE!!!!!!")
  6. --    error()
  7. --end
  8. paintutils.drawImage(tpimg, 1, 1)
  9. file = io.open("PPDATA.DTA", "r")
  10. file:write("")
  11. file:flush()
  12. if file:read("a") == "" then
  13.     term.setCursorPos(3, 17)
  14.     print("oh u dont hab username, i fixx. type username")
  15.     term.setCursorPos(3, 18)
  16.     user = io.read()
  17.     file = io.open("PPDATA.DTA", "a")
  18.     file:write(user)
  19.     file:flush()
  20. end
  21. file = io.open("PPDATA.DTA", "r")
  22. user = file:read("*all")
  23.  
  24.  
  25. paintutils.drawImage(tpimg, 1, 1)
  26. place = 2
  27. local function padstring(lr, text)
  28.     length = string.len(text)
  29.     UNlength = string.len(user)
  30.     bth = length + UNlength + 2
  31.     if bth <= lr -2 then
  32.         place = place +1
  33.         return(user..": "..text)        
  34.     else
  35.         term.setCursorPos(3, 17)
  36.         print("excuse me pls type less!!!!!")
  37.         sleep(1.5)
  38.         paintutils.drawImage(btmimg, 1, 9)
  39.     end
  40. end
  41. while true do
  42.     term.setTextColor(colors.black)
  43.     term.setBackgroundColor(colors.white)
  44.     term.setCursorPos(3, 17)
  45.     uinput = io.read()
  46.     if place >= 7 then
  47.         paintutils.drawImage(tpimg, 1, 1)
  48.         place = 2
  49.     else
  50.         paintutils.drawImage(btmimg, 1, 9)
  51.     end
  52.     term.setCursorPos(2, place)
  53.     term.setTextColor(colors.black)
  54.     term.setBackgroundColor(colors.white)
  55.     print(padstring(51, uinput))
  56. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top