This is just a neat little device to show off that you can use to prevent
Players who download your map from cheating by changing there gamemode.
This will lock players into what gamemode you want them to be in until they complete your map.At which point, you can simply do: /setblock ~ ~ ~ at the block in the center
to stop if from working.
The download is in 1.10's structure block style.
All ya need to do to use this is:
/give @p minecraft:structure_block 1
Then set it to load: "gamemode_tester" or whatever you want to call it.

Then place the download file below into your .minecraft structures file for the map your wanting to put this in. Instructions on how to use it or in the chest that comes with the structure.

Download Link:

Youtube or Pictures: