streamx = {} streamy = {} oldstreamx = {} oldstreamy = {} length = {} increment = {} newstream = {} initx = {} inity ={} velocityx = {} velocityy = {} color={} repeatreduction = Controls.read() color1 = Color.new(255,255,255) color2 = Color.new(255,50,50) colorscheme = 1 streamangle = 0 x = 239 y = 135 i = 1 q = 9 gravityy = 3 gravityx = 0 runonce = true maxstreamlength = 400 streamstartvalue = 40 speed = 7 streamcount = 90 while not Controls.read():start() do if (runonce) then while (i15)or(xana<-15)) then x = x+(xana/6) end if ((yana>15)or(yana<-15)) then y = y+(yana/6) end if (x>478) then x=0 end if (y>270) then y=0 end if (x<0) then x = 478 end if (y<0) then y = 270 end if (pad:down()) then gravityy = gravityy + 1 end if (pad:up()) then gravityy = gravityy - 1 end if (pad:left()) then gravityx = gravityx - 1 end if (pad:right()) then gravityx = gravityx + 1 end if (pad:square()) then q = q + 1 end if (pad:circle()) then q = q - 1 end if (pad:triangle()) then speed = speed + 1 end if (pad:cross()) then speed = speed - 1 end if pad ~= repeatreduction then if (pad:select()) then colorscheme = colorscheme + 1 if (colorscheme>4) then colorscheme = 1 end end if (pad:square()) then q = q + 1 end if (pad:circle()) then q = q - 1 end if (pad:triangle()) then speed = speed + 1 end if (pad:cross()) then speed = speed - 1 end end repeatreduction = pad while (i < streamcount) do if (newstream[i] ) then streamangle = math.random(0,360) newstream[i] = false length[i] = math.random(streamstartvalue,maxstreamlength) streamx[i] = 0 streamy[i] = 0 initx[i] = x inity[i] = y velocityx[i] = ((math.sin(math.rad(streamangle)))*increment[i]) velocityy[i] = ((math.cos(math.rad(streamangle)))*increment[i]) if (colorscheme==1) then color[i] = Color.new(math.random(0,220),math.random(0,200),255) elseif (colorscheme==2) then color[i] = Color.new(math.random(0,180),255,math.random(0,220)) elseif (colorscheme==3) then color[i] = Color.new(255,math.random(0,220),math.random(0,220)) else greycolor = math.random(0,255) color[i] = Color.new(greycolor,greycolor,greycolor) end end oldstreamx[i] = streamx[i] oldstreamy[i] = streamy[i] streamx[i] = streamx[i] + velocityx[i] streamy[i] = streamy[i] + velocityy[i] velocityx[i] = velocityx[i] + gravityx velocityy[i] = velocityy[i] + gravityy increment[i] = increment[i] + speed if (increment[i]>length[i] ) then increment[i] = streamstartvalue newstream[i] = true end i = i + 1 if pad:start() then break end end i = 1 screen:clear() screen:pixel(x, y, color1) while (i