Skript HelpSO I NEED HELPP

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

  • LOOKING FOR A VERSION OF SKRIPT?

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

Status
Not open for further replies.

electro

Member
Dec 3, 2021
2
0
1
23
So basically I need a skript. If the name of the stone tool doesn't contain the name "&a&lGem Breaker" you cannot break polished granite and there is a chance of %2 to get 1 gem from using the gem breaker. if you try to break polished granite with any other tool or item it will cancel the event. here is the gem skript
Code:
on break of polished granite:
   wait 1 tick
   event isn't cancelled
   chance of 5%
   loop-player
   add 1 to {%loop-player%.gem}
   if lore of player's tool contains "&a&lTier I"
   cancel event
   loop blocks in radius 1 around the target block
   if loop-block is polished granite
   set loop-block to air
   drop 0 polished granite
   else if lore of player's tool contains "&a&lOverworld"
   chance of 0%
   set loop-block to polished granite"

now here is the gem skript
Code:
variables:
    {%player%.gem} = 0

on join:
    if {allplayers::*} contains player:
        send "" to player
    else:
        add player to {allplayers::*}

every 10 minutes:
    loop all players:
        add 1 to {%loop-player%.gem}
        send "&6&l-=&6&l+1 Gem=-" to loop-player
        
command /gem [<text>] [<num>] [<offline player>]:
    trigger:
        if arg-1 is "pay":
            if {%player%.gem} >= arg-2:
                add arg-2 to {%arg-3%.gem}
                subtract arg-2 from {%player%.gem}
                send "&6Payed %arg-3%&6 %arg-2%&6 gems"
                send "&6You have been payed %arg-2%&6 gems by %player%&6, How nice!" to arg-3
            else:
                send "&cYou do not have enough to pay this!" to player
        if arg-1 is "bal":
            send "&6You have &6&l%{%player%.gem}%&5 gems"
        if arg-1 is "add":
            if player has permission "skript.admin":
                if arg-3 is set:
                    add arg-2 to {%arg-3%.gem}
                    send "&6Successfully added %arg-2% &6gems to %arg-3%&6's balance."
                    send "&6Admin has added %arg-2%&6 to your balance" to arg-3
                else:
                    add arg-2 to {%player%.gem}
                    send "&6Successfully added %arg-2% &6gems to %player%&6's balance."
            else:
                send "&cYou do not have permission to do this!"
        if arg-1 is "set":
            if player has permission "skript.admin":
                set {%arg-3%.gem} to arg-2
                send "&6Successfully set %arg-3%&6's balance to %arg-2%"
                send "&6Admin has set your balance to %arg-2%" to arg-3
            else:
                send "&cYou do not have permission to do that!"
        if arg-1 is "take" or "remove":
            if player has permission "skript.admin":
                subtract arg-2 from {%arg-3%.gem}
                send "&6Took %arg-2%&6 gems from %arg-3%"
                send "&6Admin has taken %arg-2%&6 from your balance" to arg-3
        if arg-1 is "baltop":
            set {_playertop} to 0
            set {_playertop2} to 0
            set {_playertop3} to 0
            set {_playertop4} to 0
            set {_playertop5} to 0
            set {_playertop6} to 0
            set {_playertop7} to 0
            set {_playertop8} to 0
            loop {allplayers::*}:
                if {%loop-value%.gem} > {%{_playertop}%.gem}:
                    set {_playertop8} to {_playertop7}
                    set {_playertop7} to {_playertop6}
                    set {_playertop6} to {_playertop5}
                    set {_playertop5} to {_playertop4}
                    set {_playertop4} to {_playertop3}
                    set {_playertop3} to {_playertop2}
                    set {_playertop2} to {_playertop}
                    set {_playertop} to loop-value
            send "&6&l1: %{_playertop}%&6&l: %{%{_playertop}%.gem}%"
            send "&6&l2: %{_playertop2}%&6&l: %{%{_playertop2}%.gem}%"
            send "&6&l3: %{_playertop3}%&6&l: %{%{_playertop3}%.gem}%"
            send "&6&l4: %{_playertop4}%&6&l: %{%{_playertop4}%.gem}%"
            send "&6&l5: %{_playertop5}%&6&l: %{%{_playertop5}%.gem}%"
            send "&6&l6: %{_playertop6}%&6&l: %{%{_playertop6}%.gem}%"
            send "&6&l7: %{_playertop7}%&6&l: %{%{_playertop7}%.gem}%"
            send "&6&l8: %{_playertop8}%&6&l: %{%{_playertop8}%.gem}%"
        if arg-1 is "help":
            send "&7[Insert Help Here"
            
command /gems:
    trigger:
        send "&6You have &6&l%{%player%.gem}%&5 gems"


Do you know how i can make this skript thank you
 
Status
Not open for further replies.