Advertisement
SirBaconBitz

Armor

Jan 25th, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. bacon = true
  2. sign = peripheral.wrap("top")
  3. signtwo = peripheral.wrap("right")
  4. term.clear()
  5. term.setCursorPos(1,1)
  6. term.write("Enter Player Name: ")
  7. name = read()
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. term.write("Press any key to exit")
  11. function endit()
  12. os.pullEvent("key")
  13. bacon = false
  14. end
  15. signtwo.setLine(1, name)
  16. function signdist()
  17. sleep(0.1)
  18. p = peripheral.wrap("left")
  19. local data = p.getPlayerData(name)
  20. local helmet = data["armor"]["helmet"]["name"]
  21. local chestplate = data["armor"]["chestplate"]["name"]
  22. local leggings = data["armor"]["leggings"]["name"]
  23. local boots = data["armor"]["boots"]["name"]
  24. sign.setLine(1, helmet)
  25. sign.setLine(2, chestplate)
  26. sign.setLine(3, leggings)
  27. sign.setLine(4, boots)
  28. end
  29. while bacon == true do
  30. parallel.waitForAny(function() signdist() end, function() return endit() end)
  31. end
  32. shell.run("armor")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement