CobraOs

Untitled

Oct 24th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. term.setTextColor(colors.black)
  2. term.setBackgroundColor(colors.white)
  3. term.clear()
  4. local image = paintutils.loadImage("bank")
  5. paintutils.drawImage(image, 1, 1)
  6. term.setCursorPos(16, 8)
  7. term.write("Please input card")
  8. while not disk.hasData("top") do
  9. os.queueEvent("randomEvent")
  10. os.pullEvent()
  11. end
  12. term.setTextColor(colors.black)
  13. term.setBackgroundColor(colors.white)
  14. term.clear()
  15. local image = paintutils.loadImage("bank")
  16. paintutils.drawImage(image, 1, 1)
  17. term.setCursorPos(16, 8)
  18. term.write("Please enter code")
  19. code = ""
  20. for i=1, 4 do
  21. ponies=false
  22. while not ponies do
  23. local event, key = os.pullEvent("key")
  24. if key>1 and key<11 then
  25. amount = key-1
  26. ponies = true
  27. end
  28. end
  29. code = code..amount
  30. paintutils.drawImage(image, 1, 1)
  31. term.setCursorPos(16, 10)
  32. term.setBackgroundColor(colors.lightBlue)
  33. term.write(code)
  34. end
  35.  
  36. shell.run("delete", "disk/temp")
  37. shell.run("cp", "disk/money", "disk/temp")
  38.  
  39. file = fs.open("disk/temp", "r")
  40. stringcode = file.readLine()
  41. file.close()
  42. shell.run("delete", "disk/temp")
  43.  
  44. stringcode = string.sub(stringcode, 5, -5)
  45.  
  46. file = fs.open("disk/temp", "w")
  47. file.writeLine(stringcode)
  48. file.close()
  49.  
  50. shell.run("decrypt", "disk/temp", code)
Advertisement
Add Comment
Please, Sign In to add comment