I took a while to make this so I hope you enjoy!
but one thing:
php saves the chat in a text file. but sadly replit removes the changes made by the program, so therefore messages will be deleted.
Looks pretty cool, the color scheme is a bit ugly though.