>?     ^-- title: parallax train -- author: potato imaginator -- desc: Enjoy Animation -- script: lua r=40 -- Radius of Sun t=0 -- Time c=0 -- Color a1,a2={},{} h1={1,2,2} -- Weighted Randomness h2={1,1,2} -- Weighted Randomness for i=1,4 do a1[i]= {x=120+2*r*(i-2), h=h1[math.random(1,#h1)]} end for i=1,4 do a2[i]= {x=120+2*r*(i-2), h=h2[math.random(1,#h2)]} end function draw1() for i=1,#a1 do tri (a1[i].x,68+r-a1[i].h*r, a1[i].x-r,68+r,a1[i].x+r,68+r,2+c) end rect(0,68+r,240,136,2+c) end function upd1() for i=1,#a1 do a1[i].x=a1[i].x-1/2 if a1[i].x<=-r then table.remove(a1,1) a1[#a1+1]= {x=120+2*r*(#a1-1), h=math.random(1,2)} end end end function draw2() for i=1,#a2 do tri (a2[i].x,68+r-a2[i].h*r+136-68-r, a2[i].x-r,68+r+136-68-r, a2[i].x+r,68+r+136-68-r,0) end end function upd2() for i=1,#a2 do a2[i].x=a2[i].x-2 if a2[i].x<=-r then table.remove(a2,1) a2[#a2+1]= {x=120+2*r*(#a2-1), h=math.random(1,2)} end end end function TIC() cls(3+c) upd1() upd2() circ(120,68,r,4+c) draw1() rect(0,68,240,6,1+c) for i=0,10 do rect(64*i-t%64,68,4,136,1+c) end for i=-2,2 do rect(120-12+26*i,68-9,2*12,8,1+c) end tri (120-12-53+1,68-9, 120-12-53+1,68-1,120-12-60,68-1,1+c) tri (119+12+53,68-9, 119+12+53,68-1,119+12+60,68-1,1+c) draw2() if btnp(4) then c=7-c end t=t+1 end