ui=-1
time=0
function ultraantimatter()
for y = 0, 383, 1 do
for x = 0, 611, 1 do
if tpt.get_property("type", x, y) == 72 then
for ox = (-1) ,1,1 do
for oy = (-1) ,1,1 do
v = tpt.get_property("type", x+ox, y+oy)
if v ~= 0 then
if v ~= 72 then
if v ~= 131 then
if v ~= 18 then
if v ~= 31 then
tpt.delete(x+ox,y+oy)
tpt.set_property("type",131,x,y)
tpt.set_property("tmp",30,x,y)
tpt.set_property("life",0,x,y)
end
end
end
end
end
end
end
end
end
end
end
function click()
if time >= 3 then
if tpt.mousex >= 612 then
if tpt.mousex <= 628 then<br/> if tpt.mousey >= 48 then
if tpt.mousey <= 64 then<br/> ui=ui*(-1)
end
end
end
end
time = 0
end
time = time+1
end
function hover()
if tpt.mousex >= 612 then
if tpt.mousex <= 628 then<br/> if tpt.mousey >= 48 then
if tpt.mousey <= 64 then<br/> tpt.drawtext(541,53,"Ultraantimatter")
end
end
end
end
end
function amui()
if ui == 1 then
tpt.fillrect(612,48,16,16)
tpt.drawtext(618,53,"A",0,0,0)
end
if ui == (-1) then
tpt.drawrect(612,48,16,16)
tpt.drawtext(618,53,"A")
end
end
function on()
if ui == 1 then
tpt.register_step(ultraantimatter)
end
if ui == (-1) then
tpt.unregister_step(ultraantimatter)
end
end
tpt.register_step (amui)
tpt.register_step (on)
tpt.register_step (hover)
tpt.register_mouseclick (click)