Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. --verison of spawner
  2. local function verison()
  3. set.textColor(colors.yellow)
  4. cenText("Auto-Spawner Verison 1.0",1)
  5. end
  6.  
  7.  
  8. ----This is the function to center text
  9.  
  10.  
  11. local w, h = term.getSize()
  12.  
  13. --function to centertext
  14.  
  15. local function cenText(text,y)
  16.     math.floor(w-#text/2)
  17.     term.write(text)
  18. end
  19.  
  20. local function setup()
  21.     term.clear()
  22.     term.setCursorPos(1,1)
  23. end
  24.  
  25. end
  26. cenText(ver ,1)
  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.  
  42.  
  43.  
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement