View difference between Paste ID: a26Gz7Js and P4m1LC3q
SHOW: | | - or go back to the newest paste.
1
--Varibles
2-
  version = 1.0
2+
  version = 1.4
3
  running = true
4-
  
4+
5-
  
5+
6
  --Images
7-
  bg1 = paintutils.loadImage("dt")
7+
  bg1 = paintutils.loadImage("bg1")
8
  bg2 = paintutils.loadImage("bg2")
9
  bg3 = paintutils.loadImage("bg3")
10
  bg4 = paintutils.loadImage("bg4") --Background by SargentsteveEr
11
  _plate = paintutils.loadImage("plate")
12-
  
12+
13-
  local response = http.get("")
13+
  rscon = paintutils.loadImage("rscon")
14-
  if response then
14+
15-
    local ver = response.readAll()
15+
16-
    if tonumber( ver ) > tonumber( version ) then
16+
17-
      print("There's a new update, going to install!")
17+
18-
    else
18+
19-
      print("Running Latest Version")
19+
20-
      sleep(1)
20+
21-
      init()
21+
22
    term.setCursorPos(1, 1)
23-
end
23+
24-
  
24+
25
  drawMenu1 = function()
26
    term.setCursorPos(1, 18)
27
    term.setBackgroundColor( colors.lime )
28
    term.setTextColor( colors.white )
29
    print("Power   ")
30
    term.setCursorPos(1, 17)
31
    print("BgPick  ")
32
    term.setCursorPos(1, 16)
33
    print("Programs")
34
  end
35-
  
35+
36
  Naminginput = function()
37
    term.setBackgroundColor(colors.lightGray)
38
    term.setTextColor(colors.black)
39
    paintutils.drawImage(_plate, 1,1)
40-
    print("Power ")
40+
41
    write("Open the file")
42-
    print("BgPick")
42+
43
    naminginput = read()
44-
    print("More  ")
44+
45
    init()
46-
  
46+
47
 
48
 
49
 
50
  bgtab = function()
51
    term.setBackgroundColor(colors.lightGray)
52-
    write("Name the file")
52+
53
    paintutils.drawImage(_plate, 1,1)
54
    term.setCursorPos(18, 8)
55
    write("Pick Your BG")
56
    term.setCursorPos(20, 10)
57
    term.setBackgroundColor(colors.white)
58-
  
58+
59-
59+
60-
  
60+
61
  end
62
 
63
  mtab = function()
64
    term.setBackgroundColor(colors.lightGray)
65
    paintutils.drawImage(_mtab, 1,1)
66
    term.setCursorPos(34, 4)
67
    term.setTextColor(colors.blue)
68
    write("Programs:")
69
    term.setCursorPos(34, 5)
70
    term.setTextColor(colors.black)
71
    write("CC Paint")
72
    term.setCursorPos(34, 6)
73-
  
73+
    write("Redset")
74
  end
75
 
76
  rscontrol = function()
77
    term.setBackgroundColor(colors.lightGray)
78
    paintutils.drawImage(rscon, 1,1)
79
    _rs = 1
80
  end
81
     
82
 
83-
  end 
83+
84
    term.setCursorPos(1, 19)
85
    term.setBackgroundColor( colors.lightBlue )
86
    term.clearLine()
87
    term.setCursorPos(1, 19)
88
    term.setBackgroundColor( colors.lime )
89
    term.setTextColor( colors.white )
90
    term.write("Menu  ")
91
    sleep()
92
    term.setCursorPos(46, 19)
93
  end
94
 
95
  drawDeskTop = function()
96
    term.setBackgroundColor(colors.white)
97
    term.clear()
98
    term.setCursorPos(1, 1)
99
    if b2 == 1 then
100
      paintutils.drawImage(bg1, 1,1)
101
    elseif b2 == 2 then
102
      paintutils.drawImage(bg2, 1,1)
103
    elseif b2 == 3 then
104
      paintutils.drawImage(bg3, 1,1)
105
    elseif b2 == 4 then
106
      paintutils.drawImage(bg4, 1,1)
107
    end
108
  end
109
 
110-
  
110+
111-
  
111+
112
    clear()
113
    running = false
114
    term.setTextColor( colors.orange )
115
    os.shutdown()
116
  end  
117
 
118
  runTime = function()
119
    while running do
120
      event, button, x, y = os.pullEvent("mouse_click")
121
      if _ms == 0 and button == 1 and x < 9 and y == 19 then
122-
      if _ms == 0 and button == 1 and x < 7 and y == 19 then
122+
123
        _ms = 1
124
      elseif _ms == 1 and button == 1 and y == 18 and x < 7 then
125
        stop()
126
      elseif _ms == 1 and button == 1 and x < 9 and y == 19 then
127-
      elseif _ms == 1 and button == 1 and x < 7 and y == 19 then
127+
128
      elseif _ms == 1 and button == 1 and x < 9 and y == 17 then
129-
      elseif _ms == 1 and button == 1 and x < 7 and y == 17 then
129+
        bgtab()
130-
        bgtab() 
130+
131
        init()
132
      elseif _ms == 1 and b2 > 1 and button == 1 and x == 20 and y == 10 then
133
        b2 = b2 - 1
134
        init()
135
      elseif _ms == 1 and b2 < 4 and button == 1 and x == 26 and y == 10 then
136-
      elseif _ms == 1 and b2 < 3 and button == 1 and x == 26 and y == 10 then
136+
137
        init()
138-
        init() 
138+
      elseif _ms == 1 and button == 1 and x < 9 and y == 16 then
139-
      elseif _ms == 1 and button == 1 and x < 7 and y == 16 then
139+
140
      elseif _ms == 1 and button == 1 and x == 47 and y == 2 then
141
        init()
142
      elseif _ms == 1 and button == 1 and x == 45 and y == 5 then
143
        Naminginput()
144
      elseif _ms == 1 and button == 1 and x == 45 and y == 6 then
145
        rscontrol()
146
      elseif _rs == 1 and button == 1 and x == 14 and y == 2 then
147
        _rs = 0
148-
    
148+
149
      elseif _rs == 1 and button == 1 and x == 6 and y == 4 then
150
        rs.setOutput("back", true)
151
        sleep(1)
152
      elseif _rs == 1 and button == 1 and x == 5 and y == 5 then
153
        rs.setOutput("left", true)
154-
  end
154+
        sleep(1)
155
      elseif _rs == 1 and button == 1 and x == 7 and y == 5 then
156
        rs.setOutput("right", true)
157
        sleep(1)
158
      elseif _rs == 1 and button == 1 and x == 6 and y == 6 then
159
        rs.setOutput("front", true)
160
        sleep(1)
161
      elseif _rs == 1 and button == 1 and x == 12 and y == 4 then
162
        rs.setOutput("back", false)
163
        sleep(1)
164
      elseif _rs == 1 and button == 1 and x == 11 and y == 5 then
165
        rs.setOutput("left", false)
166
        sleep(1)
167
      elseif _rs == 1 and button == 1 and x == 13 and y == 5 then
168
        rs.setOutput("right", false)
169
        sleep(1)
170
      elseif _rs == 1 and button == 1 and x == 12 and y == 6 then
171
        rs.setOutput("front", false)
172
      end
173
    end
174
  end
175
   
176
  init = function()
177
    _ms = 0
178
    drawDeskTop()
179
    drawTaskBar()
180
    runTime()
181
 end
182
 
183
init()