MrRobar35

Impulser v1 (normal)

Nov 13th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.11 KB | None | 0 0
  1. local a=require("component")local b=require("sides")local c=require("term")local d=require("text")local e=require("event")local f=require("unicode")local g=a.gpu;local h=a.redstone;local i=1;local j=0;local k=false;local l=true;local m="Renta-Sys"local function n(o,p)g.set(math.ceil(40/2)-f.len(o)/2,p,o)end;c.clear()g.setResolution(40,12)g.setBackground(0x000000)g.setForeground(0xe89404)n("[НАЧАТЬ]",8)g.setForeground(0xFFFFFF)n("Импульсов:"..i.."",3)n("[СБРОСИТЬ]",7)g.setForeground(0xFFFF00)n(m,1)g.setForeground(0x00FF00)g.set(1,7,"[+ ЦИКЛ]")g.setForeground(0x4e5054)g.set(33,7,"[- ЦИКЛ]")g.set(1,12,"(c) rrr_game")g.setForeground(0xFF0000)g.set(34,12,"[ВЫХОД]")while true do local q,q,r,s,q=e.pull("touch")if r<9 and s==7 then g.setForeground(0x009e00)g.set(1,7,"[+ ЦИКЛ]")os.sleep(0.2)g.setForeground(0x00FF00)g.set(1,7,"[+ ЦИКЛ]")i=i+1 end;if r>32 and s==7 and k==true then g.setForeground(0x870000)g.set(33,7,"[- ЦИКЛ]")os.sleep(0.2)g.setForeground(0xFF0000)g.set(33,7,"[- ЦИКЛ]")i=i-1 end;if r>=15 and r<=24 and s==7 then g.setForeground(0x878787)n("[СБРОСИТЬ]",7)os.sleep(0.2)g.setForeground(0xFFFFFF)n("[СБРОСИТЬ]",7)i=1 end;if r>=34 and s==12 then g.setForeground(0x870000)g.set(34,12,"[ВЫХОД]")os.sleep(0.2)g.setForeground(0xFF0000)g.set(34,12,"[ВЫХОД]")break end;if r>=16 and r<=23 and s==8 then l=false;g.setForeground(0x8e5a00)n("[НАЧАТЬ]",8)os.sleep(0.2)g.setForeground(0xe89404)n("[НАЧАТЬ]",8)g.set(1,3,"                                          ")n("Начинаю отправлять импульсы...",3)for t=1,i do n(tostring(t),4)h.setOutput(b.right,15)os.sleep(0.5)h.setOutput(b.right,0)end;os.sleep(0.5)i=1;g.set(1,4,"                                          ")l=true end;if i==1 then k=false;g.setForeground(0x4e5054)g.set(33,7,"[- ЦИКЛ]")else k=true;g.setForeground(0xFF0000)g.set(33,7,"[- ЦИКЛ]")end;if l==true then g.set(1,3,"                                          ")g.setForeground(0xFFFFFF)n("Импульсов:"..i.."",3)end end;g.setForeground(0xFFFFFF)c.clear()print("Спасибо за использование!")
Advertisement
Add Comment
Please, Sign In to add comment