variables: {message} = 0 {AutoWiad.%player%} = true options: czas: 1 #W sek tag: s msg1: x msg2: d msg3: xx msg4: dd msg5: xd msg6: xxdd command /automsg []: trigger: open chest with 1 row named "&6AutoMsg" to player if {AutoWiad.%player%} is true: set player's current inventory's slot 4 to green wool named "&2AutoWiadomosci" with lore "&cStatus &2%{AutoWiad.%player%}%||&cKliknij aby wylaczyc AutoWiadomosci" else: set player's current inventory's slot 4 to red wool named "&4AutoWiadomosci" with lore "&cStatus &4%{AutoWiad.%player%}%||&cKliknij aby wlaczyc AutoWiadomosci" on inventory click: if inventory name of current inventory of player is "&6AutoMsg": cancel event if {AutoWiad.%player%} is false: set {AutoWiad.%player%} to true send "&cAutoWiadomosci &2&lON" execute player command "automsg" else: set {AutoWiad.%player%} to false send "&cAutoWiadomosci &4&lOFF" execute player command "automsg" every {@czas} second: loop all players: if {AutoWiad.%loop-players%} is true: add 1 to {message} if {message} is 1: send "{@tag} {@msg1}" to loop-players if {message} is 2: send "{@tag} {@msg2}" to loop-players if {message} is 3: send "{@tag} {@msg3}" to loop-players if {message} is 2: send "{@tag} {@msg4}" to loop-players if {message} is 3: send "{@tag} {@msg5}" to loop-players if {message} is 6: send "{@tag} {@msg6}" to loop-players set {message} to 0