Skip to content

Instantly share code, notes, and snippets.

@Core-commits
Last active August 7, 2020 13:48
Show Gist options
  • Save Core-commits/e39fcf0538c79dbd68f07c9b887e133a to your computer and use it in GitHub Desktop.
Save Core-commits/e39fcf0538c79dbd68f07c9b887e133a to your computer and use it in GitHub Desktop.
Game.on("playerJoin", (player) => {
player.on("initialSpawn", async () => {
let VAR = 10
for (let i = 0; i < VAR; i++) {
player.topPrint(`Game starts in ${VAR - i} seconds.`)
console.log(VAR)
console.log(i)
await sleep(1000)
if (i == 9) {
player.centerPrint("Game has started", 2)
}
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment