red = Color.new(255,0,0)
green = Color.new(0,255,0)
select=1
select1=red
select2=red
select3=red
select4=red
select5=red
select6=red

waittime=1
oldpad=Controls.read()
while true do
screen:clear()
pad = Controls.read()
waittime=waittime+1
	screen:print(0,0,"Made by:10$man",green)
	screen:print(100,100,"Goto Graph (IN PROGRESS)",select1)
	screen:print(100,120,"Goto Beneksturun Theorom (Pointless XD)",select2)
	screen:print(100,140,"Goto Polynomial Solver",select3)
	screen:print(100,160,"Goto Formulas",select4)
	screen:print(100,180,"Goto Credits",select5)
	screen:print(100,200,"Settings",select6)
	screen:print(0,262,"Thanks for using.",green)
	
	if pad:up() and pad:up() ~= oldpad:up() then
		select=select-1
	end
	if pad:down() and pad:down() ~= oldpad:down() then
		select=select+1
	end
	
	if select==1 then
		select1=green
		else
		select1=red
	end
	if select==2 then
		select2=green
		else
		select2=red
	end
	if select==3 then
		select3=green
		else
		select3=red
	end
	if select==4 then
		select4=green
		else
		select4=red
	end
	if select==5 then
		select5=green
		else
		select5=red
	end
	if select==6 then
		select6=green
		else
		select6=red
	end
	if pad:cross() and select==1 and waittime>10 then
		dofile("./System/GRAPH.LUA")
		break;
	end
	if pad:cross() and select==2 and waittime>10 then
		dofile("./System/benek.lua")
		break;
	end
	if pad:cross() and select==3 and waittime>10 then
		dofile("./System/poloptions.lua")
		break;
	end
	if pad:cross() and select==4 and waittime>10 then
		dofile("./System/formula.lua")
		break;
	end
	if pad:cross() and select==5 and waittime>10 then
		dofile("./System/credits.lua")
		break;
	end
	if pad:cross() and select==6 and waittime>10 then
		dofile("./System/setting.lua")
		break;
	end
	if select>6 then
	select=1
	end
	if select<1 then
	select=6
	end
screen.flip()
screen.waitVblankStart()
oldpad=pad
end