Discord Thread remove on funkcion

  • 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 comminuty!

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

skUnity Discord

Site Manager
Aug 5, 2023
12,755
1
0
The skUnity Discord
discord.gg
code_language.skript:
function reloadGun(player: player, a: number):
    if {reload::%{_player}%} is true:
        stop
    set {_ammoAmount} to amount of purple dye in {_player}'s inventory
    set {reload::%{_player}%} to true
    send action bar "&dReload&4█████" to {_player}
    wait 1 second
    send action bar "&dReload&2█&4████" to {_player}
    wait 1 second
    send action bar "&dReload&2██&4███" to {_player}
    wait 1 second
    send action bar "&dReload&2███&4██" to {_player}
    wait 1 second
    send action bar "&dReload&2████&4█" to {_player}
    wait 1 second
    send action bar "&dReload&2█████" to {_player}
    wait 10 tick
    set {reload::%{_player}%} to false
    set {_Ammo} to line 8 of lore of {_player}'s tool
    wait 1 tick 
    if {_ammoAmount} > {_a}-1:
        remove {_a} purple dye from {_player}'s inventory
        set {ammo::%{_Ammo}%} to {_a}
        send action bar "&d%{ammo::%{_Ammo}%}% &8/ &5%{_a}%" to {_player}
    else:
        if {_ammoAmount} > 0:
            remove {_ammoAmount} purple dye from {_player}'s inventory
            set {ammo::%{_Ammo}%} to {_ammoAmount}
            send action bar "&d%{ammo::%{_Ammo}%}% &8/ &5%{_a}%" to {_player}

Posted by: .dolyn0 from the skUnity Discord. View the thread on skUnity Discord here
 
Status
Not open for further replies.