Help with seconds and minutes and hours in Scoreboard

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

matthi

VIP
Supporter
Dec 17, 2023
2
0
1
Austria
Hello, is it possible to change my code that the Time is not seconds, minutes and hours because it is way to long.
Maybe is it possible like: 1m 1s or somting like that...

Code:

options:
p: &8» &x&0&8&4&c&f&bS&x&0&e&6&b&f&cy&x&1&5&8&9&f&ds&x&1&b&a&8&f&dt&x&2&2&c&6&f&ee&x&2&8&e&5&f&fm &8┃ &7

on join:
set {timer.%player%} to false

on step on iron block:
if {timer.%player%} is false:
clear player's scoreboard
set {timer.%player%} to true
set {start.%player%} to now
play sound "item.goat_horn.sound.0" with volume 1000 and pitch 10
while {timer.%player%} is true:
set {diff.%player%} to difference between now and {start.%player%}
wait 1 tick

on step on diamond block:
if {timer.%player%} is true:
if {diff.%player%} > {bz.%player%}:
set {timer.%player%} to false
play sound "entity.ender_dragon.death" with volume 1000 and pitch 10
send "&8"
send "{@p}Du hast TownJump &aerfolgreich &7abgeschlossen."
send "{@p}Deine Zeit:&x&4&4&a&f&f&d %{diff.%player%}%"
send "&8"

if {diff.%player%} < {bz.%player%}:
set {timer.%player%} to false
set {bz.%player%} to {diff.%player%}
send "&8"
send "{@p}Du hast TownJump &aerfolgreich &7abgeschlossen."
send "{@p}Neue Rekord:&x&4&4&a&f&f&d %{diff.%player%}%"
send "&8"
play sound "entity.ender_dragon.death" with volume 1000 and pitch 10

on rightclick with redstone:
if {timer.%player%} is true:
wait 1 tick
set {timer.%player%} to false
teleport player to {spawn}
play sound "block.anvil.destroy" with volume 1 and pitch 10
send player title "&8» &x&4&c&b&d&f&dTownJump" with subtitle "&cAbgebrochen" for 0.1 seconds
stop
if {timer.%player%} is false:
wait 1 tick
teleport player to {spawn}
play sound "entity.player.levelup" with volume 1 and pitch 10
send player title "&8» &x&4&c&b&d&f&dTownJump" with subtitle "&7Spawn" for 0.1 seconds
stop

every tick:
loop all players:
if {timer.%loop-player%} is true:
replace "seconds" with "s" in {start.%loop-player%}


command /resetstats:
trigger:
set {bz.%player%} to 1 day


ScoreBoard:

every 2 ticks:
loop all players:
if {timer.%loop-player%} is true:
set title of loop-player's scoreboard to "%{animation.%loop-player%}%"
set line 8 of loop-player's scoreboard to " &7ɴᴇᴛᴢᴡᴇʀᴋ"
set line 7 of loop-player's scoreboard to "&f"
set line 6 of loop-player's scoreboard to " &8» &7ᴢᴇɪᴛ"
set line 5 of loop-player's scoreboard to " &8➜ &x&4&4&a&f&f&d%{diff.%loop-player%}%"
set line 4 of loop-player's scoreboard to "&f"
set line 3 of loop-player's scoreboard to " &8» &7ʙᴇsᴛᴢᴇɪᴛ"
set line 2 of loop-player's scoreboard to " &8➜ &x&4&4&a&f&f&d%{bz.%loop-player%}%"
set line 1 of loop-player's scoreboard to " &8"

1703825162584.png
 
Last edited: