I had some code for a timer but as many people told me, it is not very good. I wanted to replace it by a timer for events that happen every hour as a timer in scoreboard with minutes and seconds until something happens, a timer going down. Heres what I had, how could I go about replacing it with something more functional?
every 1 second:
add 1 to {timer_sec}
if {timer_sec} >= 59:
set {timer_sec} to 0
add 1 to {timer_min}
if {timer_min} >= 59:
set {timer_min} to 0
#the code u put here will proc every 1 hour
on join:
while player is online:
set line 3 of player's scoreboard to "⭐ <##FB08E1>M<##E920E4>a<##D739E6>p <##C451E9>R<##B26AEB>e<##A082EE>s<##8E9BF0>e<##7BB3F3>t <##69CCF5>I<##57E4F8>n:&c %59-{timer_min}%m %59-{timer_sec}%s"