white = Color.new(255,255,255)
red = Color.new(255,0,0)
blue = Color.new(0, 0, 255)
green = Color.new(0,255,0)
black = Color.new(0,0,0)
grey = Color.new(150,150,150)
yellow = Color.new(255,255,0)
purple = Color.new(255,0,255)

background = Image.load("Astroid_Escape/Images/menu.png")

oldpad = Controls.read()

function printCentered(y,text,color)
local length = string.len(text)
local x = 240 - ((length*8)/2)
screen:print(x,y,text,color)
end

while true do
pad = Controls.read()
screen:blit(0,0,background)
printCentered(185,"Press START To Begin",red)

if pad:start() then
dofile("Astroid_Escape/mainMenu.lua")
end

if pad:select() then
dofile("index.lua")
end

screen.waitVblankStart()
screen.flip()
end