Files
keyall.sk
Code
1 34
keyall.sk
# Custom keyall script for Skript 1.21.4
# Place this file in plugins/Skript/scripts/
# Reload with: /sk reload keyall
options:
key-name: &e&lCrate Key
default-amount: 1
permission: keyall.use
prefix: &6[KeyAll]&r
command /keyall [<integer>]:
permission: {@permission}
permission message: &cYou do not have permission to use this command.
trigger:
set {_amount} to {@default-amount}
if arg-1 is set:
set {_amount} to arg-1
if {_amount} <= 0:
send "{@prefix} &cThe amount must be greater than 0."
stop
if number of all players is 0:
send "{@prefix} &cThere are no online players."
stop
loop all players:
give {_amount} of tripwire hook named "{@key-name}" to loop-player
broadcast "{@prefix} &eEveryone has received &f%{_amount}% &e{@key-name}&e!"
on script load:
send "{@prefix} &aScript loaded successfully." to console