options: m1 : "&4You don't have permission to perform this command!" m2 : "&4Correct usage: /gm [] []" p1 : "skript.gm" msv1 : "&cSuccesfully changed &byour &cgamemode to survival" mc1 : "&cSuccesfully changed &byour &cgamemode to creative" ma1 : "&cSucessfully changed &byour &cgamemode to adventure" ms1 : "&cSucessfully changed &byour &cgamemode to spectator" msv2 : "&cSuccesfully changed gamemode of &b%arg 2%&c to survival" mc2 : "&cSuccesfully changed gamemode of &b%arg 2%&c to creative" ma2 : "&cSuccesfully changed gamemode of &b%arg 2%&c to adventure" ms2 : "&cSuccesfully changed gamemode of &b%arg 2%&c to spectator" on command: if command is "gamemode": cancel event execute player command "gm %arguments%" command /gm [] []: trigger: if player has permission {@p1}: if arg 2 is set: if arg 1 is set: arg 1 is "0" or "survival": set arg 2's gamemode to survival send {@msv2} arg 1 is "1" or "creative": set arg 2's gamemode to creative send {@mc2} arg 1 is "2" or "adventure": set arg 2's gamemode to adventure send {@ma2} arg 1 is "3" or "spectator": set arg 2's gamemode to spectator send {@ms2} else: send {m2} else: arg 1 is "0" or "survival": set player's gamemode to survival send {@msv1} arg 1 is "1" or "creative": set player's gamemode to creative send {@mc1} arg 1 is "2" or "adventure": set player's gamemode to adventure send {@ma1} arg 1 is "3" or "spectator": set player's gamemode to spectator send {@ms1} else: send {@m1}