Advertisement
SirBaconBitz

Untitled

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