key=GetKey()
If KeyHit(14)>50 Then chat$=Mid(chat,1,Len(chat)-1)
If key
If key=13
chat$=""
Else If key=8
If Len(chat$)>0 Then chat$=Left$(chat$,Len(chat$)-1)
Else If key>=32 And key<256
If Len(chat$)<25 Then chat$=chat$+Chr$(key)
EndIf
EndIf
Color 128,128,100
Rect 200,190,400,20,0
Color 250,240,200
Text 400,200,chat,1,1