I have attempted to make a game script before but i could never do it. I am about to try again i just need some help to start. Before i tell you what i need help with i just wanna say it would be very useful to write what i need in code for me since i have no idea how to. If not just kinda teach me a bit, (since i'm new with gamescripts). OK so i'm making a cops and robbers game.

Pick a random map I want the script to split all the players into 2 teams as long as their is at least 2 players in the game then
teleport cops to a certain brick in their spawn and robbers to a certain brick in their spawn

Also have a timer and if the robbers don't the win by the end of the timer the cops win or if the cops arrest everyone.

And if the robbers steal all three money bags they win

Or if a entire team leaves the other wins

then teleport everyone to lobby and reset the map

then a short intermission and repeat

THANKS A MILLION!