Advertisement
Guest User

Untitled

a guest
Jun 5th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local component = require("component")
  2. local holo = component.hologram
  3. local term = require("term")
  4. local io = require("io")
  5.  
  6. function input()
  7.     term.clear()
  8.     term.write("What scale would you like to set the holo to? ")
  9.     local s = io.read()
  10.     return tonumber(s)
  11. end
  12.  
  13. while true do
  14.     local s = input()
  15.     if s > .3 and s < 3 then
  16.         holo.setScale(s)
  17.         break
  18.     else
  19.         print("Please enter a number between .3 and 3")
  20.         os.sleep(2)
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement