Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- version: 1.0
- on load:
- if file "plugins/ModMenu/modlist.yml" doesn't exist:
- create file "plugins/ModMenu/modlist.yml"
- set yml value "modlist.1.name" of file "plugins/ModMenu/modlist.yml" to "SkriptEssentials"
- set yml value "modlist.1.desc" of file "plugins/ModMenu/modlist.yml" to "All Essential commands for Skript!"
- set yml value "modlist.1.link" of file "plugins/ModMenu/modlist.yml" to "https://pastebin.com/raw/M31YWSkV"
- set yml value "modlist.1.author" of file "plugins/ModMenu/modlist.yml" to "MisterBasic"
- set yml value "modlist.2.name" of file "plugins/ModMenu/modlist.yml" to "ConsoleAPI"
- set yml value "modlist.2.desc" of file "plugins/ModMenu/modlist.yml" to "Improve your console!"
- set yml value "modlist.2.link" of file "plugins/ModMenu/modlist.yml" to "https://pastebin.com/raw/Tc2c4x5F"
- set yml value "modlist.2.author" of file "plugins/ModMenu/modlist.yml" to "MisterBasic"
- set yml value "modlist.3.name" of file "plugins/ModMenu/modlist.yml" to "JsonAPI"
- set yml value "modlist.3.desc" of file "plugins/ModMenu/modlist.yml" to "Use special API for your scripts!"
- set yml value "modlist.3.link" of file "plugins/ModMenu/modlist.yml" to "https://pastebin.com/raw/SgDUM47H"
- set yml value "modlist.3.author" of file "plugins/ModMenu/modlist.yml" to "Rezz"
- set yml value "modlist.4.name" of file "plugins/ModMenu/modlist.yml" to "TitleAPI"
- set yml value "modlist.4.desc" of file "plugins/ModMenu/modlist.yml" to "Use special API for your scripts!"
- set yml value "modlist.4.link" of file "plugins/ModMenu/modlist.yml" to "https://pastebin.com/raw/d3gyZMi9"
- set yml value "modlist.4.author" of file "plugins/ModMenu/modlist.yml" to "Bryce/vexio"
- command /mod [<text>]:
- permission: modmenu.mod
- permission message: &cYou do not have permission!
- trigger:
- if arg 1 is "options":
- open virtual chest inventory with size 5 named "Mod Options" to player
- set {menu.%player%} to true
- else:
- open virtual chest inventory with size 5 named "&6Mods" to player
- set {menu.%player%} to true
- set {_loop} to 0
- loop 9 times:
- format gui slot {_loop} of player with black stained glass named "&0" to do nothing
- add 1 to {_loop}
- if arg 1 is not set:
- set {_mod} to 0
- set {_loop} to yml value "info.mods" of file "plugins/ModMenu/modlist.yml"
- loop {_loop} times:
- if yml value "modlist.%{_mod}%" of file "plugins/ModMenu/modlist.yml" is not set:
- format gui slot {_mod}+9 of player with red stained glass named "&4Error" with lore "&7No file found."
- add 1 to {_mod}
- else:
- set {_mod.name} to yml value "modlist.%{_mod}%.name" of file "plugins/ModMenu/modlist.yml"
- set {_mod.desc} to yml value "modlist.%{_mod}%.desc" of file "plugins/ModMenu/modlist.yml"
- set {_mod.link} to yml value "modlist.%{_mod}%.link" of file "plugins/ModMenu/modlist.yml"
- set {_mod.author} to yml value "modlist.%{_mod}%.author" of file "plugins/ModMenu/modlist.yml"
- format gui slot 9+{_mod} of player with green stained glass named "&4&n&l%{_mod.name}%" with lore "&8Description:||&7%{_mod.desc}%||&8Author:||&7 %{_mod.author}%" to close then run function installMod("%{_mod.link}%", "%{_mod.name}%")
- add 1 to {_mod}
- set {_loop} to {_mod}+9
- loop 34-{_mod} times:
- format gui slot {_loop} of player with red stained glass named "&4Error" with lore "&7No file found." to do nothing
- add 1 to {_loop}
- set {_loop} to 36
- loop 9 times:
- format gui slot {_loop} of player with black stained glass named "&0" to do nothing
- add 1 to {_loop}
- if arg 1 is "options":
- format gui slot 22 of player with red stained glass named "&4Reload" with lore "&7Reload everything!" to close then run console command "/modcmd %player% reload"
- format gui slot 21 of player with orange stained glass named "&6Update" with lore "&7Update this script!" to close then run console command "/modcmd %player% update"
- set {menu.%player%} to true
- on inventory close:
- set {menu.%player%} to false
- on inventory click:
- if {menu.%player%} is true:
- cancel event
- command /modcmd [<offlineplayer>] [<text>] [<text>]:
- executable by: console
- trigger:
- if arg 2 is "reload":
- if arg 3 is not set:
- wait a tick
- make console execute "/skript reload %script name%.sk"
- send "&1Reloaded!" to arg 1
- else:
- make console execute "/skript reload Mods\%arg 3%.sk"
- if arg 2 is "update":
- send "&1Updating to the lastest version!" to the player
- delete file "plugisn/Skript/scripts/ModMenu.sk"
- wait a tick
- download file from "https://pastebin.com/raw/32D1EanU" to file "plugins/Skript/scripts/ModMenu.sk"
- make console execute "/skript reload %script name%.sk"
- function installMod(link: text, name: text):
- send "&1Installing Server Mod %{_name}% from %{_link}%" to console
- download file from "%{_link}%" to file "plugins/Skript/scripts/Mods/%{_name}%.sk"
- make console execute "/modcmd null reload %{_name}%"
- # End
Advertisement
Add Comment
Please, Sign In to add comment