Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commands = {
- Input = {
- name = 'Auto Input',
- key = 'i',
- value = false,
- color = 1
- },
- Output = {
- name = 'Auto Output',
- key = 'o',
- value = true,
- color = 16384
- }
- }
- local function toggleValue(key)
- commands[key].value = not commands[key].value
- end
- local function getActiveColors()
- active = 0
- for k, v in pairs(commands) do
- local value = v["value"]
- if value then
- print("Value is true for ", k)
- active = active + v["color"]
- end
- end
- return active
- end
- local function printMenu()
- print('===========================')
- print('Auto Smelt 3000 - By Stouty')
- print('===========================')
- for k, v in pairs(commands) do
- toggle = v['value'] and 'ON' or 'OFF'
- print('[' .. v['key']:upper() .. '] ' .. v['name'] .. ' -> ' .. toggle)
- end
- print('===========================')
- print('')
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement