Solved please fix this skript its not working, i put it in https://parser.skunity.com/ to see if it should work

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

jeff1231

Member
Mar 22, 2024
38
1
8
on earth :o
www.costco.com
command /randomcommand:
trigger:
# Define the list of available commands
set {_commands} to ["say 1", "say 2", "say 3", "say 4", "say 5", "say 6", "say 7", "say 8", "say 9", "say 10", "say 11", "say 12", "say 13", "say 14"]

# Check if the player has already used any command
loop
set {_randomIndex} to random integer between 1 and 14
set {_selectedCommand} to {_commands} at {_randomIndex}
if {_selectedCommand} is not set:
continue
else
set {_commands} at {_randomIndex} to null
execute console command "execute as %player% run {_selectedCommand}"
break
 
command /randomcommand:
trigger:
# Define the list of available commands
set {_commands} to ["say 1", "say 2", "say 3", "say 4", "say 5", "say 6", "say 7", "say 8", "say 9", "say 10", "say 11", "say 12", "say 13", "say 14"]

# Check if the player has already used any command
loop
set {_randomIndex} to random integer between 1 and 14
set {_selectedCommand} to {_commands} at {_randomIndex}
if {_selectedCommand} is not set:
continue
else
set {_commands} at {_randomIndex} to null
execute console command "execute as %player% run {_selectedCommand}"
break
"loop" wont work cause you need to specify what to loop like "loop 5 times:"