Skip to content

Instantly share code, notes, and snippets.

@Core-commits
Last active July 21, 2020 20:44
Show Gist options
  • Save Core-commits/ab78564be4a8f656412b238911328535 to your computer and use it in GitHub Desktop.
Save Core-commits/ab78564be4a8f656412b238911328535 to your computer and use it in GitHub Desktop.
// MapChanger Simplified.
Owner = [1, 2] // Admins!
Game.command("changemap", (caller, args) => {
for (let elements of Owner) {
console.log(elements);
if (caller.userId == elements ){
console.log("Switching maps to ${args}")
Game.clearMap()
let data = Game.loadBrk("./maps/${args}.brk")
Game.setEnvironment(data.environment)
Game.players.forEach((player) => {
player.respawn()
})
console.log(data)
}
if (!Owner){console.log("No owner detected... Error!"); console.error("No shit dtected");}
else if (caller.userId != RealOwners){
console.log("Not the owner kek")
caller.centerPrint("Not an administrator kek")
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment