Is it possible to get teleportservice to go in sepreate server with an code as an gui?

Hello, im an new scripter and ive been quite intrested in like the Empire Francais battle systems and Europa Invicta, I want to make an custom battle map like them. Ive noticed that they have an custom code system and if you put in the code you go to their server.

Any idea how to do it?