-- left and right button actions

btnRight.MouseButton1Click:Connect(function()
	
	local oldScreen = screens[curScreen]
	UITween.fade(oldScreen, 1, 0.5, 0)
	UITween.move(oldScreen, UDim2.new(0.5, -100, 0.5, 0), 0.5, 0)
	
	
	if(curScreen == #screens) then
		curScreen = 0
	end
	
	curScreen = curScreen + 1
	
	local newScreen = screens[curScreen]
	newScreen.Position = UDim2.new(0.5, 100, 0.5, 0)
	UITween.move(newScreen, UDim2.new(0.5, 0, 0.5, 0), 0.5, 0)
	UITween.fade(newScreen, 0, 0.5, 0)
end)

btnLeft.MouseButton1Click:Connect(function()

	local oldScreen = screens[curScreen]
	UITween.fade(oldScreen, 1, 0.5, 0)
	UITween.move(oldScreen, UDim2.new(0.5, 100, 0.5, 0), 0.5, 0)
	
	curScreen = curScreen - 1

	if(curScreen == 0) then
		curScreen = #screens
	end

	local newScreen = screens[curScreen]
	newScreen.Position = UDim2.new(0.5, -100, 0.5, 0)
	UITween.move(newScreen, UDim2.new(0.5, 0, 0.5, 0), 0.5, 0)
	UITween.fade(newScreen, 0, 0.5, 0)
end)
