Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local event = require("event")
- local term = require("term")
- local gpu = component.gpu
- local sensor = component.openperipheral_sensor
- local cb = component.command_block
- local inWork = false
- gpu.setResolution(40,20)
- --Заголовок и края
- gpu.setForeground(0x8B4513)
- gpu.setBackground(0xFFFF00)
- term.clear()
- --gpu.setForeground(0x00008B)
- --gpu.setBackground(0xFFFF00)
- gpu.set(13,4, " ██████ ")
- gpu.set(13,5, " ██████████ ")
- gpu.set(13,6, " ██████████ ")
- gpu.set(13,7, " ██ ██ ")
- gpu.set(13,8, " ██ ██ ")
- gpu.set(13,9, " ██ ██ ")
- gpu.set(13,10," ██ ██ ")
- gpu.set(13,11,"██ ██")
- gpu.set(13,12,"██ ██")
- gpu.set(13,13,"██ ██")
- gpu.set(13,14,"██ ██")
- gpu.set(13,15,"████ ████")
- gpu.set(13,16," ██████████ ")
- gpu.setForeground(0x00FF00)
- gpu.set(21,7, "▒▒")
- gpu.set(21,8, "▒▒")
- gpu.set(19,9, "▒▒▓▓▒▒")
- gpu.set(17,10,"▒▒░░▓▓▓▓▒▒")
- gpu.set(15,11,"▒▒░░▓▓▓▓▓▓▓▓▒▒")
- gpu.set(15,12,"▒▒░░▓▓▓▓▓▓▓▓▒▒")
- gpu.set(15,13,"▒▒▓▓▓▓▓▓▓▓░░▒▒")
- gpu.set(15,14,"▒▒▓▓▓▓▓▓▓▓░░▒▒")
- gpu.set(17,15,"▒▒▓▓▓▓░░▒▒")
- gpu.setForeground(0xFFFFFF)
- gpu.setBackground(0x000000)
- function ClickScreen(name,adr,x,y,mousekey,player)
- if inWork then
- return
- else
- inWork = true
- end
- xplevel = sensor.getPlayerByName(player).all().player.experience.level
- if xplevel > 0 then
- RunCommand("/XP -1L "..player)
- RunCommand("/give "..player.." 384 2")
- else
- RunCommand("/msg "..player.." Недостаточно опыта")
- end
- inWork = false
- end
- function RunCommand(text)
- if cb.setCommand(text) then
- cb.executeCommand()
- end
- end
- event.listen("touch",ClickScreen)
- while true do
- os.sleep(5)
- end
Add Comment
Please, Sign In to add comment