Advertisement
Jazza

Untitled

Jul 14th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. local whitelist = {}
  2. whitelist.tjwato = true
  3. whitelist.Jazza_Hat = true
  4. whitelist.CausticFury = true
  5. whitelist.Nevercast = true
  6.  
  7. t = peripheral.wrap("top")
  8.  
  9. function isPLayerNearby()
  10. nearby = detect.getNearbyPlayers()
  11. for i,v in ipairs(nearby) do
  12. if whitelist[v.player] then
  13. return true
  14. end
  15. end
  16. return false
  17. end
  18.  
  19. while true do
  20. if isPLayerNearby() then
  21. redstone.setOutput("top", true)
  22. sleep(10)
  23. redstone.setOutput("top", false)
  24. end
  25. sleep(0.5)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement