1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need help fix a skript

Discussion in 'Skript' started by Michele, Nov 3, 2019.

  1. Michele

    Michele Member

    Joined:
    Jul 6, 2019
    Messages:
    10
    Likes Received:
    0
    Hello, I found a script that one of my friends need but it has 32 errors and I'm not good enough to fix them.
    Code (Text):
    1. # WorldHost Legendary v1.2.0
    2. options:
    3.     support-see: rank.support #Permission to see support requests
    4.     lobby-world: world #Main world for commands to be dispatched from
    5.     fly-permission: node.fly #Permission to fly in {@lobby-world}
    6.    
    7.    
    8.  
    9.    
    10.    
    11.    
    12. function scriptCompile(n: number) :: number:
    13.     broadcast "&cReloading &aWorld&eHost&c version 1.0 &6by &9_C02&c!"
    14.     execute console command "sk reload WorldHost"
    15. function credSend(p: player) :: player:
    16.     send "&7" to {_p}
    17.     send "&aWorld Host &bcreated by &e_C02" to {_p}
    18.     send "&aTwitter: &[email protected]_C02" to {_p}
    19.     send "&aServer: &bdeathryl.ga:2108" to {_p}
    20.     send "&aDonate to me :D: &bPaypal: &[email protected]" to {_p}
    21.     send "&7" to {_p}
    22. on server stop:
    23.     scriptCompile(1)
    24. command /fly [<offline player>]:
    25.     trigger:
    26.         if world is "%{server.%player%}%":
    27.             if arg 1 is set:
    28.                 if offlineplayer-arg is online:
    29.                     if {flight.%arg-1%} is set:
    30.                         delete {flight.%arg-1%}
    31.                         set arg-1's flight mode to false
    32.                         send "&bYour flight mode was changed to false!" to arg-1
    33.                         send "&aFlight mode updated"
    34.                     else:
    35.                         set {flight.%arg-1%} to true
    36.                         set arg-1's flight mode to true
    37.                         send "&bYour flight mode was changed to true!" to arg-1
    38.                         send "&aFlight mode updated"
    39.                 else:
    40.                     send "&cThat player is not online!"
    41.             else:
    42.                 if {flight.%player%} is set:
    43.                     delete {flight.%player%}
    44.                     set player's flight mode to false
    45.                     send "&bYour flight mode was changed to false!"
    46.                     send "&aFlight mode updated"
    47.                 else:
    48.                     set {flight.%player%} to true
    49.                     set player's flight mode to true
    50.                     send "&bYour flight mode was changed to true!"
    51.                     send "&aFlight mode updated"
    52.         else if world is "{@lobby-world}":
    53.             if player has permission "{@fly-permission}":
    54.                 if arg 1 is set:
    55.                     if offlineplayer-arg is online:
    56.                         if {flight.%arg-1%} is set:
    57.                             delete {flight.%arg-1%}
    58.                             set arg-1's flight mode to false
    59.                             send "&bYour flight mode was changed to false!" to arg-1
    60.                             send "&aFlight mode updated"
    61.                         else:
    62.                             set {flight.%arg-1%} to true
    63.                             set arg-1's flight mode to true
    64.                             send "&bYour flight mode was changed to true!" to arg-1
    65.                             send "&aFlight mode updated"
    66.                     else:
    67.                         send "&cThat player is not online!"
    68.                 else:
    69.                     if {flight.%player%} is set:
    70.                         delete {flight.%player%}
    71.                         set player's flight mode to false
    72.                         send "&bYour flight mode was changed to false!"
    73.                         send "&aFlight mode updated"
    74.                     else:
    75.                         set {flight.%player%} to true
    76.                         set player's flight mode to true
    77.                         send "&bYour flight mode was changed to true!"
    78.                         send "&aFlight mode updated"
    79.             else:
    80.                 send "&cInsufficient permissions!"
    81.         else:
    82.             send "&cYou are not the creator of this server."
    83. command /gm [<offline player>] [<text>]:
    84.     trigger:
    85.         if world is "%{server.%player%}%":
    86.             if arg 1 is set:
    87.                 if offlineplayer-arg is online:
    88.                     if arg-1's world is "%{server.%player%}%":
    89.                         if arg 2 is "creative" or "c" or "1":
    90.                             set the arg-1's gamemode to creative
    91.                             send "&fYour gamemode has been updated" to arg-1
    92.                             send "&f%arg-1%'s gamemode has been updated"
    93.                         else if arg 2 is "survival" or "s" or "0":
    94.                             set the arg-1's gamemode to survival
    95.                             send "&fYour gamemode has been updated" to arg-1
    96.                             send "&f%arg-1%'s gamemode has been updated"
    97.                         else if arg 2 is "adventure" or "a" or "2":
    98.                             set the arg-1's gamemode to adventure
    99.                             send "&fYour gamemode has been updated" to arg-1
    100.                             send "&f%arg-1%'s gamemode has been updated"
    101.                         else if arg 2 is "spectator" or "sp" or "3":
    102.                             set the arg-1's gamemode to spectator
    103.                             send "&fYour gamemode has been updated" to arg-1
    104.                             send "&f%arg-1%'s gamemode has been updated"
    105.                         else:
    106.                             send "&fInvalid gamemode: &cCreative/Survival/Adventure/Spectator"
    107.                     else:
    108.                         send "&fThat player is offline!"
    109.                 else:
    110.                     send "&fThat player is offline!"
    111.             else:
    112.                 send "&fUsage: /gm (player) (type)"
    113.         else:
    114.             send "&cI'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error."
    115. command /bc [<text>]:
    116.     aliases: /broadcast
    117.     trigger:
    118.         if world is "%{server.%player%}%":
    119.             if arg 1 is set:
    120.                 broadcast "&9Broad&ecast&9> &e%arg-1%" to player's world
    121.             else:
    122.                 send "&cProvide a message!"  
    123.         else:
    124.             send "&cYou are not the creator of this server."
    125. command /pluginsmenu [<text>]:
    126.     trigger:
    127.         if world is "%{server.%player%}%":
    128.             wait 0.2 seconds
    129.             open chest with 6 rows named "<underline>Plugins" to player
    130.             if {essentials.installed.%{server.%player%}%} is set:
    131.                 format slot 0 of player with bookshelf named "&e<underline>HPE" with lore "&fAKA WorldHost Essentials||&fRemake of Essentials for WorldHost Servers||&fCurrently installed: &aTrue" to close then run [make player execute command "cloud:install_essentials"]
    132.             else:
    133.                 format slot 0 of player with bookshelf named "&e<underline>HPE" with lore "&fAKA WorldHost Essentials||&fRemake of Essentials for WorldHost Servers||&fCurrently installed: &cFalse" to close then run [make player execute command "cloud:install_essentials"]
    134. command /cloud:install_essentials:
    135.     trigger:
    136.         if {essentials.installed.%{server.%player%}%} is set:
    137.             delete {essentials.installed.%{server.%player%}%}
    138.             remove 1 from {installed.%{server.%player%}%}
    139.             send "&9Plu&egins&9> &eEssentials &7has been &cdeleted&7."
    140.             wait 3 seconds
    141.             send "&2&m==================================================="
    142.             send "&7"
    143.             send "&9Plu&egins&9> &7Any plugins installed/deleted may require a restart to take effect."
    144.             send "&9Plu&egins&9> &7As a reminder, &cmore plugins = more lag"
    145.             send "&9Plu&egins&9> &7Restart the server with &e/stop"
    146.             send "&7"
    147.             send "&2&m==================================================="
    148.         else:
    149.             add 1 to {installed.%{server.%player%}%}
    150.             set {essentials.installed.%{server.%player%}%} to true
    151.             send "&9Plu&egins&9> &eEssentials &7has been &ainstalled&7."
    152.             wait 3 seconds
    153.             send "&2&m==================================================="
    154.             send "&7"
    155.             send "&9Plu&egins&9> &7Any plugins installed/deleted may require a restart to take effect."
    156.             send "&9Plu&egins&9> &7As a reminder, &cmore plugins = more lag"
    157.             send "&9Plu&egins&9> &7Restart the server with &e/stop"
    158.             send "&7"
    159.             send "&2&m==================================================="      
    160. command /control [<text>]:
    161.     trigger:
    162.         if world is "%{server.%player%}%":
    163.             open chest with 1 row named "<underline>%{server.%player%}% Control" to player
    164.             format slot 1 of player with minecart named "&ePlugins" with lore "&fCurrently installed||&e%{installed.%{server.%player%}%}%/5" to close then run [make player execute command "pluginsmenu"]
    165.             format slot 3 of player with paper named "&eGamerules" to close then run [make player execute command "gamerulesmenu"]
    166.             format slot 5 of player with command block named "&eReset" with lore "&cWill stop your server||&cCannot be undone" to close then run [make player execute command "reset-world"]
    167.             format slot 7 of player with lava bucket named "&eDelete" with lore "&cCompletely deletes your server||&cCannot be undone||&cName can be taken" to close then run [make player execute command "reset-all"]
    168.             format slot 0 of player with ender pearl named "&eRequest Support" with lore "&fIf you need help" to close then run [make player execute command "support request"]
    169.             format slot 2 of player with grass named "&eNews" with lore "&fSet news" to close then run [make player execute command "news"]
    170.         else if world is "{@lobby-world}":
    171.             send "&fUnknown command. Type ""/help"" for help."
    172.         else:
    173.             send "&cYou are not the creator of this server."
    174. command /support [<text>]:
    175.     trigger:
    176.         if arg 1 is "request":
    177.             if {server.%player%} is set:
    178.                 loop all players:
    179.                     if loop-player has permission "{@support-see}":
    180.                         send "&e%player% &7has requested support on their server &e%{server.%player%}%"
    181.             else:
    182.                 send "&9World&eHost&9> &7You must have a server to use this command."
    183.         else:
    184.             stop
    185. command /whkick [<offline player>] [<text>]:
    186.     trigger:
    187.         if arg 1 is set:
    188.             if offlineplayer-arg is online:
    189.                 if arg 2 is set:
    190.                     send "&c----------------------------" to arg-1
    191.                     send "&fKicked from %players world%: %arg-2%" to arg-1
    192.                     send "&fYou have been connected to the Lobby." to arg-1
    193.                     send "&c----------------------------"
    194.                     execute console command "mvtp %arg-1% {@lobby-world}"
    195.                 else:
    196.                     send "&c----------------------------" to arg-1
    197.                     send "&fKicked from %players world%: No Reason Provided" to arg-1
    198.                     send "&fYou have been connected to the Lobby." to arg-1
    199.                     send "&c----------------------------"
    200.                     execute console command "mvtp %arg-1% {@lobby-world}"
    201.             else:
    202.                 send "&9World&eHost&9> &7That player is not online!"
    203.         else:
    204.             send "&9World&eHost&9> &7Usage: /kick (player) <reason(optional)>"
    205. command /whban [<offline player>] [<text>]:
    206.         if arg 1 is set:
    207.             if offlineplayer-arg is online:
    208.                 if arg 2 is set:
    209.                     set {banned.%player%.%player's world%} to true
    210.                     set %{ban.reason.%player%.%player's world%}% to "%arg-2%"
    211.                     send "&c----------------------------" to arg-1
    212.                     send "&fBanned from %players world%: %arg-2%" to arg-1
    213.                     send "&fYou have been connected to the Lobby." to arg-1
    214.                     send "&c----------------------------"
    215.                     execute console command "mvtp %arg-1% {@lobby-world}"
    216.                 else:
    217.                     send "&c----------------------------" to arg-1
    218.                     send "&fBanned from %players world%: No Reason Provided" to arg-1
    219.                     send "&fYou have been connected to the Lobby." to arg-1
    220.                     send "&c----------------------------"
    221.                     execute console command "mvtp %arg-1% {@lobby-world}"
    222.             else:
    223.                 send "&9World&eHost&9> &7That player is not online!"
    224.         else:
    225.             send "&9World&eHost&9> &7Usage: /kick (player) <reason(optional)>"
    226. command /delete [<offline player>]:
    227.     permission: host.admin
    228.     permission message: &cYou do not have permission.
    229.     trigger:
    230.         if arg 1 is set:
    231.             if offlineplayer-arg is offline:
    232.                 stop
    233.             else:
    234.                 execute console command "mvdelete %{server.%player%}%"
    235.                 execute console command "mvconfirm"
    236.                 delete {news.%{server.%player%}%}
    237.                 delete {joinmessage.%{server.%player%}%}
    238.                 delete {server.strike.%{server.%player%}%}
    239.                 delete {name.%{server.%player%}%}
    240.                 delete {server.%player%}
    241.                 delete {players.%arg-1%}
    242. command /create [<text>]:
    243.     trigger:
    244.         world is "{@lobby-world}":
    245.             if arg 1 is set:
    246.                 if {server.%player%} is not set:
    247.                     if {name.%arg-1%} is not set:
    248.                         if {access.%player%} is not set: #Change later
    249.                             send "&9World&eHost&9> &7Creating your server."
    250.                             send "&9World&eHost&9> &7This may take a few moments..."
    251.                             execute console command "mvcreate %arg-1% normal -t flat"
    252.                             wait 3 seconds
    253.                             set {server.%player%} to "%arg-1%"
    254.                             set {name.%arg-1%} to true
    255.                             make player execute command "join %arg-1%"
    256.                         else:
    257.                             stop
    258.                     else:
    259.                         send "&9World&eHost&9> &7A server already exists by that name."
    260.                 else:
    261.                     send "&9World&eHost&9> &cYou already have a server!"
    262.             else:
    263.                 send "&9World&eHost&9> &7Usage: /create (name)"
    264.         else:
    265.             send "&fUnknown command. Type ""/help"" for help."
    266. command /setmotd [<text>]:
    267.     trigger:
    268.         if {server.%player%} is set:
    269.             if world is "%{server.%player%}%":
    270.                 send "&9Motd> &7Your server MOTD has been updated to &e%arg-1%&7."
    271.                 set {motd.%{server.%player%}%} to "%arg-1%"
    272.                 wait 2 seconds
    273.                 send "&2&m======================================="
    274.                 send "&7"
    275.                 send "&9Restart> &7You may have to restart for any changes!"
    276.                 send "&7"
    277.                 send "&2&m======================================="
    278. command /join [<text>]:
    279.     trigger:
    280.         world is "{@lobby-world}":
    281.             if arg 1 is set:
    282.                 if {name.%arg-1%} is true:
    283.                     if arg-1 is "%{server.%player%}%":
    284.                         loop all players:
    285.                             if {banned.%player%.%arg-1%} is not set:
    286.                                 if {players.%arg-1%} is greater than 0:
    287.                                     send "&9World&eHost&9> &7Sending you to your requested server..." to player
    288.                                     execute console command "mvtp %player% %arg-1%"
    289.                                     add 1 to {players.%{server.%player%}%}
    290.                                     send "&2&m===================================" to player
    291.                                     send "&7" to player
    292.                                     send "&9Server> &7Welcome to your &aFree Server&7, provided by WorldHost!" to player
    293.                                     send "&9Server Notes> &7None!" to player
    294.                                     if {server.strike.%{server.%player%}%} is set:
    295.                                         send "&9Server Strikes> &e%{server.strike.%{server.%player%}%}%/5" to player
    296.                                     else:
    297.                                         send "&9Server Strikes> &70" to player
    298.                                         send "&7" to player
    299.                                         send "&2&m===============================" to player
    300.                                 else:
    301.                                     send "&9World&eHost&9> &7Your requested server is starting up..."
    302.                                     send "&9World&eHost&9> &7This may take a few moments..."
    303.                                     if {loading.%player%} is true:
    304.                                         execute console command "mvunload %arg-1%"
    305.                                         ban the player due to "&cYou have been temporarily blacklisted from WorldHost%nl%&6Expires in 5 minutes%nl%&fReason: &bSpamming Join Command, attempting to crash software%nl%&bStaff: &eSentry"
    306.                                         wait 5 minutes
    307.                                         execute console command "pardon %player%"
    308.                                     else:
    309.                                         set {loading.%player%} to true
    310.                                         wait 2 seconds
    311.                                         execute console command "mvload %arg-1%"
    312.                                         set {loading.%player%} to true
    313.                                         send "&9Loading> &7Loading.."
    314.                                         wait 1 second
    315.                                         send "&9Loading> &7Loading..."
    316.                                         wait 1 second
    317.                                         send "&9Loading> &7Loading..."
    318.                                         wait 1 second
    319.                                         send "&9Loading> &7Loading..."
    320.                                         wait 1 second
    321.                                         send "&9Loading> &7Loading..."
    322.                                         wait 1 second
    323.                                         send "&9Loading> &7Loading..."
    324.                                         wait 1 second
    325.                                         send "&9Loading> &7Loading..."
    326.                                         wait 5 seconds
    327.                                         send "&9World&eHost&9> &7Sending you to your requested server."
    328.                                         execute console command "mvtp %player% %arg-1%"
    329.                                         add 1 to {players.%arg-1%}
    330.                                         add 1 to {total.%arg-1%}
    331.                                         delete {loading.%player%}
    332.                                         if {joinmessage.%arg-1%} is true:
    333.                                             broadcast "&e%player% joined the game." to player's world
    334.                         else:
    335.                             loop all players:
    336.                                 if {players.%arg-1%} is greater than 0:
    337.                                     send "&9World&eHost&9> &7Sending you to your requested server..." to player
    338.                                     execute console command "mvtp %player% %arg-1%"
    339.                                     add 1 to {players.%{server.%player%}%}
    340.                                     send "&2&m===================================" to player
    341.                                     send "&7" to player
    342.                                     send "&9Server> &7Welcome to your &aFree Server&7, provided by WorldHost!" to player
    343.                                     send "&9Server Notes> &7None!" to player
    344.                                     if {server.strike.%{server.%player%}%} is set:
    345.                                         send "&9Server Strikes> &e%{server.strike.%{server.%player%}%}%/5" to player
    346.                                     else:
    347.                                         send "&9Server Strikes> &70" to player
    348.                                         send "&7" to player
    349.                                         send "&2&m===============================" to players
    350.                                 else:
    351.                                     send "&9World&eHost&9> &7Your requested server is starting up..."
    352.                                     send "&9World&eHost&9> &7This may take a few moments..."
    353.                                     if {loading.%player%} is true:
    354.                                         execute console command "mvunload %arg-1%"
    355.                                         ban the player due to "&cYou have been temporarily blacklisted from WorldHost%nl%&6Expires in 5 minutes%nl%&fReason: &bSpamming Join Command, attempting to crash software%nl%&bStaff: &eSentry"
    356.                                         wait 5 minutes
    357.                                         execute console command "pardon %player%"
    358.                                     else:
    359.                                         set {loading.%player%} to true
    360.                                         wait 2 seconds
    361.                                         execute console command "mvload %arg-1%"
    362.                                         set {loading.%player%} to true
    363.                                         send "&9Loading> &7Loading..."
    364.                                         wait 1 second
    365.                                         send "&9Loading> &7Loading..."
    366.                                         wait 1 second
    367.                                         send "&9Loading> &7Loading..."
    368.                                         wait 1 second
    369.                                         send "&9Loading> &7Loading..."
    370.                                         wait 1 second
    371.                                         send "&9Loading> &7Loading..."
    372.                                         wait 1 second
    373.                                         send "&9Loading> &7Loading..."
    374.                                         wait 1 second
    375.                                         send "&9Loading> &7Loading..."
    376.                                         wait 5 seconds
    377.                                         send "&9World&eHost&9> &7Sending you to your requested server."
    378.                                         execute console command "mvtp %player% %arg-1%"
    379.                                         add 1 to {players.%arg-1%}
    380.                                         add 1 to {total.%arg-1%}
    381.                                         delete {loading.%player%}
    382.                                         if {joinmessage.%arg-1%} is true:
    383.                                             broadcast "&e%player% joined the game." to player's world
    384.                             else:
    385.                                 send "&c----------------------------"
    386.                                 send "&fKicked while connecting: You're banned!"
    387.                                 send "&fReason: %{ban.reason.%player%.%arg-1%}%"
    388.                                 send "&c----------------------------"
    389.                     else:
    390.                         send "&9World&eHost&9> &7No server exists by the name &e%arg-1%&7."
    391.             else:
    392.                 send "&fUnknown command. Type ""/help"" for help."
    393.  
    Please help me

    PS:
    On the official page of this skript it says that multiverse core, and skellet are required
     
Loading...