Graphics={}Graphics.__index=Graphics;function Graphics.new()local self=setmetatable({},Graphics)self:clear()return self end;function Graphics:clear()self.__text=""self.__emoji=""self.__rad=""self.__this_line=""self.__last_line=""self.__last_last_line=""self.__starting_index=1;self.__current_index=1;self.__ending_index=1;self.__done_function=(function()end)()end;function Graphics:append_text(a,b)self.__text=self.__text..string.gsub(a,"\n+"," ")self.__emoji=b end;function Graphics:on_complete(c)self.__done_function=c end;function flash(d,e)frame.display.bitmap(241,191,160,2,e,string.rep("\xFF",20*d))frame.display.bitmap(311,121,d,2,e,string.rep("\xFF",20*d))end;function Graphics.__print_layout(f,g,h,b,i)local j=118;local k=58;local l=91;if i=="A"then flash(10,0)elseif i=="C"then flash(20,10)end;frame.display.text(b,640-l,j,{color='YELLOW'})if f==''and g==''then frame.display.text(h,1,j)elseif f==''then frame.display.text(g,1,j)frame.display.text(h,1,j+k)else frame.display.text(f,1,j)frame.display.text(g,1,j+k)frame.display.text(h,1,j+k*2)end;frame.display.show()end;function Graphics:print()if self.__text:sub(self.__starting_index,self.__starting_index)==' 'then self.__starting_index=self.__starting_index+1 end;if self.__current_index>=self.__ending_index then self.__starting_index=self.__ending_index;self.__last_last_line=self.__last_line;self.__last_line=self.__this_line;self.__starting_index=self.__ending_index end;for m=self.__starting_index+22,self.__starting_index,-1 do if self.__text:sub(m,m)==' 'or self.__text:sub(m,m)==''then self.__ending_index=m;break end end;self.__this_line=self.__text:sub(self.__starting_index,self.__current_index)self.__print_layout(self.__last_last_line,self.__last_line,self.__this_line,self.__emoji,self.__rad)if self.__current_index>=#self.__text then pcall(self.__done_function)self.__done_function=(function()end)()return end;self.__current_index=self.__current_index+1 end