r = Image.load("color/red.png")
b = Image.load("color/blue.png")
g = Image.load("color/green.png")
w = Image.load("color/white.png")
y = Image.load("color/yellow.png")

timer = Timer.new(0)
timer:stop()

function Pixelfix()
timer:start()
if timer:time() >= 0 and timer:time() < 200 then
screen:blit(0,0,r)
end
if timer:time() >= 200 and timer:time() < 400 then
screen:blit(0,0,b)
end
if timer:time() >= 400 and timer:time() < 600 then
screen:blit(0,0,g)
end
if timer:time() >= 600 and timer:time() < 800 then
screen:blit(0,0,w)
end
if timer:time() >= 800 and timer:time() < 1000 then
screen:blit(0,0,y)
end
if timer:time() >= 1000 then
timer:stop()
timer:reset(0)
end
end

while true do
pad = Controls.read()

Pixelfix()

if pad:start() then
r = nil
b = nil
g = nil
w = nil
y = nil
dofile("LUATool.lua")
end



collectgarbage()
screen.waitVblankStart()
screen.flip()
end