Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. --This is my code for Auto-Spawner I am building
  2.  
  3. --verison of spawner
  4.  
  5.  
  6. ----This is the function to center text
  7.  
  8.  
  9. local w, h = term.getSize()
  10.  
  11. --function to centertext
  12.  
  13. local function cenText(text,y)
  14.     math.floor(w-#text/2)
  15.     term.write(text)
  16. end
  17.  
  18. local function setup()
  19.     term.clear()
  20.     term.setCursorPos(1,1)
  21. end
  22. local function verison()
  23. term.setTextColor(colors.yellow)
  24. cenText("Auto-Spawner Verison 1.0",1)
  25. end
  26.  
  27.  
  28.  
  29. menuOptions = {
  30.     [1]= {text = "Zombie"},
  31.     [2]= {text = "Blaze"},
  32.     [3]= {text = "Skelton"},
  33.     [4]= {text = "Sheep"},
  34.     [5]= {text = "Reset"},
  35. }
  36.  
  37.  
  38. local function mainMenu()
  39.     setup()
  40.     verison()
  41. end
  42.  
  43. mainMenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement