I want to make a command block creation in which the player can be in mode which is similar to spectator mode. My only difficulty is that I want to make a player go into creative but to change player permissions using commands any way to do this?
I don't believe there is. You can try to imitate it but you can't really do that unfortunately. I can see if I can on single player worlds instead of a realm a little later because you might be able to specify player type permissions. I really wish they would give us the option to customize what ranks are able to do what
I'm not sure how experienced you are with commands, but if you need me to join your world to help you develop a spectator mode I will. My gamertag is: @Silentism. For now I will give you a brief explanation of how I would go about creating it.
Spectator mode is possible in bedrock edition. Its a little tricky since commands can't change permissions. I have never created a spectator mode myself, but off the top of my head heres how it would be executed.
1)Create a tag:
Utilize the /tag command. So that when tagged with "spectator" the spectating commands will come into play.
Use /effect commands to give the spectator certain effects so that he/she can't deal damage to other players.
I'd assume you would want the spectator to be invincible so that they are not able to get killed. So you should use /effect commands and boost there defenses and health attributes.
Unless you want other players to see spectators then you should put an invisibility effect on the spectator. The particles around the spectator will still be visible. However, you can hide the particles by using an invisible-particle texture pack. There is one available free to download at mcpedl.com.
5)Remove ability to build/mine
To make it so the spectator can not build/mine you will need to use a /gamemode command to set them in adventure mode.
If you want to allow your spectator to fly then you will need to enable Minecrafts: "experimental mode". Doing this will allow you to access the /mayfly command which can then be used on your spectator.
To help polish things up, you should add an action bar title using a /title command that reminds the player he/she is in spectator mode.
If you only want your spectator to be able to access certain areas then you can set a ring using radius and radius minimum selectors. Then use a /teleport command to teleport all players with the "spectator" tag back inside the ring.
You should give the spectators an item called "stop spectating". When thrown, it should clear their effects and return them back to wherever you want them so they can continue playing as a normal player. There is quite a bit of commands that goes into making items like this. However, its mainly done by using a /execute command.
Command blocks only load in when a player is near them. So you will need to set a /tickingarea wherever you put all these commands. That way, when a player goes far away from the command blocks they will still be loaded.
Result: Now you have an invisible player that can't receive damage, can't deal damage, can't build/mine, and can fly around and spectate. The biggest flaw is that they will still be able to access chests and use buttons/levers. When the player leaves "spectator mode" you will need more commands to clear their effects and change there gamemode and /mayfly settings back to normal.
I hoped this helped. Creating something like this is very time consuming and uses a long list of commands. This could be considered a very complex and high-end creation. The key is to keep your commands neat and organized so they can easily be adjusted when necessary. If I join your world and do it for you, i'd ask that you credit me along with my realm code in return.
Ok, Im curious if he is on Java then. That's the only reason I didn't have something like that already. /mayfly would have allowed you to fly in adventure thus not having any block interaction.
Im also curious how he planned to do /effect to remove your pvp effects. I know you can give infinite health to someone to make them immune to damage but idk how to make it that one would be unable to attack.