Last active
July 21, 2020 20:44
-
-
Save Core-commits/ab78564be4a8f656412b238911328535 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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