Lapzzo Posted September 28, 2021 Share Posted September 28, 2021 How can I add a pasword to this skript? Ive tried something like command /repair <player> <number> trigger: if arg-2 is 10: # Do stuff But it wont work. Heres the skript # Skript made by NotKaizo, Thanks NotKaizo -Lapzzo options: balance: {coins::%player's uuid%} repair_cost: 50 command /repair <player>: usage: &cIncorect usage! trigger: if arg-1 is set: open inventory of arg-1 to player set {activeGui::%player's uuid%} to "inventoryGui" play sound "block.note_block.pling" to player send "&aPlease click an item to repair it for 50 Coins!" to player else: send "e" to player on inventory click: {activeGui::%player's uuid%} = "inventoryGui" cancel event set {_dura} to max durability of clicked item set {_fix} to durability of clicked item if {_fix} < {_dura}: if {@balance} >= {@repair_cost}: remove {@repair_cost} from {@balance} repair clicked item play sound "block.note_block.pling" to player else: play sound "entity.villager.no" to player send "&cYou do not have enough!" else if {_fix} >= {_dura}: play sound "entity.villager.no" to player on inventory close: if {activeGui::%player's uuid%} is "inventoryGui": delete {activeGui::%player's uuid%} send "&cYou closed your inventory!" Link to comment Share on other sites More sharing options...
_Mr_Puppy_ Posted October 6, 2021 Share Posted October 6, 2021 (edited) this might work... # Skript made by NotKaizo, Thanks NotKaizo -Lapzzo options: balance: {coins::%player's uuid%} repair_cost: 50 command /repair [<player>] [<number>]: usage: &cIncorect usage! trigger: if arg-1 is set: if arg-2 is "put password here": open inventory of arg-1 to player set {activeGui::%player's uuid%} to "inventoryGui" play sound "block.note_block.pling" to player send "&aPlease click an item to repair it for 50 Coins!" to player else: send "&cWrong Password." to player on inventory click: {activeGui::%player's uuid%} = "inventoryGui" cancel event set {_dura} to max durability of clicked item set {_fix} to durability of clicked item if {_fix} < {_dura}: if {@balance} >= {@repair_cost}: remove {@repair_cost} from {@balance} repair clicked item play sound "block.note_block.pling" to player else: play sound "entity.villager.no" to player send "&cYou do not have enough!" else if {_fix} >= {_dura}: play sound "entity.villager.no" to player on inventory close: if {activeGui::%player's uuid%} is "inventoryGui": delete {activeGui::%player's uuid%} send "&cYou closed your inventory!" or just... command /repair [<player>] [<number>]: trigger: if arg-1 is set: if arg-2 is "put password here": #do stuff else: send "&cWrong Password." Edited October 6, 2021 by _Mr_Puppy_ Link to comment Share on other sites More sharing options...
Witho Posted October 8, 2021 Share Posted October 8, 2021 I like how you guys made these really advanced scripts and then at the end mr puppy just gave him what he wanted lol Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now