Survival-System [Skript] 1.4

This script contains the most important functions for an online survival server

  1. Germa21
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.8
    • 1.16
    Code (Text):
    options:
        Prefix: &7[&9System&7]
        Servername: &aSMP
        Noperm: &9You do not have permission to perform this command
        tchat:   &9Teamchat
        report: &c&lReport

    command /tpa <player>:
        trigger:
            if arg 1 is a player:
                set {tpa.%argument 1%} to player
                send "{@Prefix} &7You can factually accept the TPA with &a/tpaccept" to argument 1
                send "{@Prefix} &7You can refuse the Tpa with &c/tpadeny" to argument 1
                message ""
                message "{@Prefix} &7Tpa sent"
                message ""
                wait 60 seconds
                delete {tpa.%argument 1%}
                message "{@Prefix} &7The TPA could not be accepted"
               
            if arg 1 is not set:
                message "{@Prefix} &7Correct usage &e/tpa (Spieler)"
           
    command /tpaccept:
        trigger:
            if {tpa.%player%} is set:
                teleport {tpa.%player%} to player
                send "{@Prefix} &7You became &9%{tpa.%player%}% &7teleported" to player
                stop
               
    command /tpdeny:
        trigger:
            if {tpa.%player%} is set:
                delete {tpa.%player%}
                message "{@Prefix} &7You have successfully rejected the TPA"
               
    command /chatclear:
        permission: System.chatclear
        trigger:
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast " "
            broadcast "{@Prefix} &7The chat was cleared by &9%player%"

    #
    #Bansystem
    #
           
    command /unban [<offlineplayer>]:
        permission: System.unban
        permission message: {@Noperm}
        trigger:
            if arg 1 is set:
                if {banned.%arg 1%} is true:
                    unban arg-1
                    unban ip of arg 1
                    set {banned.%arg 1%} to false
                    loop all players:
                        loop-player has permission "System.unban"
                        send "{@Prefix} &9%arg-1% &7was made by &9%player% &7unbanned." to loop-player
                else:
                    send "{@Prefix}: &7This player is not banned!"
            else:
                send "{@Prefix}:&7Correct usage: &9/ Unban <Player>"
                       
    command /ban [<Offlineplayer>] [<Text>]:
        trigger:
            if player has permission "System.ban":
                if arg 1 is set:
                    if arg 2 is set:
                        set {banned.%arg 1%} to true
                        set {ban.time.%arg 1%} to now
                        set {ban.reason.%arg 1%} to argument 2
                        set {ban.expire.%arg 1%} to "Nie"
                        set {ban.bannedby.%arg 1%} to player
                        set {BanIP.%arg 1%} to "Kein IPBan"
                        ban arg 1 due to "&8&l+--------------------+%newline%%newline%&c&lXXX {@Servername} &c&lXXX%newline%%newline%  &cYou have been banned! %newline%%newline% &cReason &e%arg-2% %newline%%newline% &cContact: [email protected] %newline%%newline%&8&l+--------------------+"
                        kick arg-1 due to "&8&l+--------------------+%newline%%newline%&c&lXXX {@Servername} &c&lXXX%newline%%newline%  &cYou have been banned! %newline%%newline% &cReason &e%arg-2% %newline%%newline% &cContact: [email protected] %newline%%newline%&8&l+--------------------+"
                        loop all players:
                            loop-player has permission "System.ban"
                            send "{@Prefix} &9%arg-1% &7was made by &9%player% &7banned: reason: &9%arg 2%" to loop-player
                    else:
                        send "{@Prefix}: &fCorrect usage: &9/Ban <player> <Reason>"
                else:
                    send "{@Prefix}: &7Correct usage: &9/Ban <player> <Reason>"
            else:
                send "{@Prefix}: &7You do not have permission to perform this command!"

    command /baninfo [<offlineplayer>]:
        trigger:
            if player has permission "System.baninfo":
                if arg 1 is set:
                    if {banned.%arg 1%} is true:
                        send "&7&m-----&cBanInfo-----"
                        send "&c&lBanned player&7: %arg 1%"
                        send "&c&lBanned by&7: %{ban.bannedby.%arg 1%}%"
                        send "&c&lBan reason&7: %{ban.reason.%arg 1%}%"
                        send "&c&lIP banned &7: %{BanIP.%arg 1%}%"
                        send "&c&lElapsed time&7: %{ban.expire.%arg 1%}%"
                        send "&7&m-----&cBanInfo-----"
                    else:
                        send "{@Prefix}: &7This player is not banned!"
                else:
                    send "{@Prefix}: &7Correct usage: &9/ Baninfo <player>"
            else:
                send "{@Prefix}: &7You do not have permission to perform this command!"
               
    command /kick [<Offlineplayer>] [<Text>]:
        trigger:
            if player has permission "System.kick":
                if arg 1 is set:
                    if arg 2 is set:
                        kick arg 1 due to "&8&l+--------------------+%newline%%newline%&c&lXXX {@Servername} &c&lXXX%newline%%newline%  &cYou got kicked! %newline%%newline% &cReason &e%arg-2%%newline%%newline%&8&l+--------------------+"
                        loop all players:
                            loop-player has permission "System.kick"
                            send "{@Prefix} &9%arg-1% &7was kicked by &9%player% &7Reason: &9%arg 2%" to loop-player
                    else:
                        send "{@Prefix}: &7Correct usage: &9/kick <Player> <Reason>"
                else:
                    send "{@Prefix}: &7Correct usage: &9/kick <Player> <Reason>"
            else:
                send "{@Prefix}: &7You do not have permission to perform this command!"  
               
    #
    #Spawn system
    #

    command /setspawn:
        permission: System.setspawn
        trigger:
            message "{@Prefix} &7You set the spawn"
            set {Spawn} to location of player
           
    command /spawn:
        trigger:
            teleport player to {Spawn}
            message "{@Prefix} &7You have been teleported to the spawn"
    #
    #Vanish system
    #






    command /vanish [<offline player>]:
        permission: System.vanish
        aliases: /v
        executable by: player
        trigger:
            if arg 1 is not set:
                if {vanish.%player%} is not set:
                    hide the player from all players
                    set player's gamemode to creative
                    broadcast "&e%player% left the game"
                    send "{@Prefix} &7You are now in &9Vanish&f."
                    set {vanish.%player%} to true
                    loop all players:
                        if loop-player has permission "System.vanish":
                            send "{@Prefix} &7The player &9%player% &7is now in the vanish." to loop-player
                else:
                    reveal the player from all players
                    set player's gamemode to survival
                    send "{@Prefix} &7You are no longer in &9Vanish&f."
                    delete {vanish.%player%}
                    loop all players:
                        if loop-player has permission "System.vanish":
                            send "{@Prefix} &7The player &9%player% &7is no longer in the vanish" to loop-player
            if arg 1 is set:
                if {vanish.%arg 1%} is not set:
                    hide the arg 1 from all players
                    send "{@Prefix} &7You are now in &9Vanish&f." to arg 1
                    set {vanish.%arg 1%} to true
                    loop all players:
                        if loop-player has permission "System.vanish":
                            send "{@Prefix} &7The player &9%arg-1% &7is now in the vanish." to loop-player
                else:
                    reveal the arg 1 from all players
                    send "{@Prefix} &7You are no longer in &9Vanish&f." to arg 1
                    delete {vanish.%arg 1%}
                    loop all players:
                        if loop-player has permission "System.vanish":
                            send "&7The player &9%arg-1% &7is no longer in the vanish." to loop-player
                           
    #
    #gamemode system
    #                  

    command /gm [<text>]:
        permission: System.gamemode
        permission message: {@Noperm}
        trigger:
            if arg 1 is "0" or "survival":
                set player's gamemode to survival
                message "{@Prefix} &7Your gamemode has been set to &9Survival"
               
            if arg 1 is "1" or "creative":
                set player's gamemode to creative
                message "{@Prefix} &7Your gamemode has been set to &9Creative"

            if arg 1 is "2" or "adventure":
                set player's gamemode to adventure
                message "{@Prefix} &7Your gamemode has been set to &9Adventure"
           
            if arg 1 is "3" or "spectator":
                message "{@Prefix} &7Your gamemode has been set to &9Spectator"
                make player execute command "/minecraft:gamemode spectator"
           
            if arg 1 is not set:
                message "{@Prefix} &7Correct ussage: &9/gm <0,1,2,3>"

    #
    #Fly
    #

    command /fly [<text>]:
        permission: System.fly
        permission message: {@Noperm}
        trigger:
            if arg 1 is "on":
                set player's flight mode to true
                message "{@Prefix} &7Your flight mode was set to &atrue"
            if arg 1 is "off":  
                set player's flight mode to false
                message "{@Prefix} &7Your flight mode was set to &cfalse"
               
    #
    #Blockages
    #

    command /?:
        trigger:
            message "{@Noperm}"
           
    command /help:
        trigger:
            message "{@Noperm}"
           
    command /pl:
        trigger:
            message "{@Noperm}"
           
    command /plugins:
        trigger:
            message "{@Noperm}"
           
    #
    #Dc/ts commands
    #

    command /discord:
        aliases: dc
        trigger:
            message " "
            message "{@Prefix} &9Your discord"
            message " "
           
    command /teamspeak:
        aliases: ts
        trigger:
            message " "
            message "{@Prefix} &9Your teamspeak"
            message " "
    #
    #Broadcast
    #

    command /broadcast [<text>]:
        permission: System.broadcast
        permission message: {@Noperm}
        aliases: bc
        trigger:
            if arg 1 is set:
                broadcast "        &c&lBroadcast"
                broadcast " "
                broadcast "{@Prefix} &c&l%arg-1%&c&l"
                broadcast "&c&l "
            else:
                message "{@Prefix} &7Correct usage: &9/broadcast <text>"
               
    on join:
        set join message to "{@Prefix} &9%player% &7joined the Server"
       
    #
    #Teamchat system
    #

    command /teamchat [<text>]:
        permission: System.teamchat
        permission message: {@Noperm}
        trigger:
            if arg 1 is "login":
                if {tchat.login.%player%} is true:
                    message "{@tchat} &7You are already logged in"
                if {tchat.login.%player%} is false:
                    set {tchat.login.%player%} to true
                    message "{@tchat} &7You have been logged in"
            if arg 1 is "logout":
                if {tchat.login.%player%} is false:
                    message "{@tchat} &7You are already logged out"
                if {tchat.login.%player%} is true:
                    set {tchat.login.%player%} to false
                    message "{@tchat} &7You have been logged out"
            if arg 1 is set:
                if {tchat.login.%player%} is false:
                    message "{@tchat} &7You are not logged in use /teamchat (loggin/logout) to log in or out"
                if {tchat.login.%player%} is true:
                    loop all players:
                        if loop-player has permission "System.teamchat":
                            send "{@tchat} &f%arg-1%"
    #
    #Report
    #                      
    command /report <player> [<text>]:
        trigger:
            if arg 1 is a player:
                if arg 1 is "%player%":
                    message "{@report} &c&lYou cannot report yourself"
                if arg 1 is not "%player%":
                    if arg 2 is not "Hacking" or "Chatabuse" or "Pedophilic machinations" or "insult" or "Griefing" or "accept" or "end":
                        message "&c&l---------------------------------------------"
                        message "    &c&lPlease use one of these report reasons"
                        message " "
                        message "&f» &c&lHacking"
                        message "&f» &c&lChatabuse"
                        message "&f» &c&lPedophilic machinations"
                        message "&f» &c&linsult"
                        message "&f» &c&lGriefing"
                        message "&c&l---------------------------------------------"
                if arg 2 is "Hacking":
                    message "{@report} &c&lYou have successfully reported the player"
                    set {report.%arg-1%.from.%player%.accept} to false
                    loop all players:
                        if loop-player has permission "System.report.controll":
                            send "                    {@report}"
                            send "&f» &cReporter: &c&l%player%"
                            send "&f» &cReported player: &c&l%arg-1%"
                            send "&f» &cReason: &c&l%arg-2%"
                            send "&f» &c&laccept the report with /report (reported-player) accept"
                            send "                    {@report}"
                            set {report.%arg-1%.notaccept} to false
                            set {report.%arg-1%.reportedplayer} to "%arg-1%"
                if arg 2 is "Chatabuse":
                    message "{@report} &c&lYou have successfully reported the player"
                    set {report.%arg-1%.from.%player%.accept} to false
                    loop all players:
                        if loop-player has permission "System.report.controll":
                            send "                    {@report}"
                            send "&f» &cReporter: &c&l%player%"
                            send "&f» &cReported player: &c&l%arg-1%"
                            send "&f» &cReason: &c&l%arg-2%"
                            send "&f» &c&laccept the report with /report (reported-player) accept"
                            send "                    {@report}"
                            set {report.%arg-1%.notaccept} to false
                            set {report.%arg-1%.reportedplayer} to "%arg-1%"
                if arg 2 is "Pedophilic machinations":
                    message "{@report} &c&lYou have successfully reported the player"
                    set {report.%arg-1%.from.%player%.accept} to false
                    loop all players:
                        if loop-player has permission "System.report.controll":
                            send "                    {@report}"
                            send "&f» &cReporter: &c&l%player%"
                            send "&f» &cReported player: &c&l%arg-1%"
                            send "&f» &cReason: &c&l%arg-2%"
                            send "&f» &c&laccept the report with /report (reported-player) accept"
                            send "                    {@report}"
                            set {report.%arg-1%.notaccept} to false
                            set {report.%arg-1%.reportedplayer} to "%arg-1%"
                if arg 2 is "insult":
                    message "{@report} &c&lYou have successfully reported the player"
                    set {report.%arg-1%.from.%player%.accept} to false
                    loop all players:
                        if loop-player has permission "System.report.controll":
                            send "                    {@report}"
                            send "&f» &cReporter: &c&l%player%"
                            send "&f» &cReported player: &c&l%arg-1%"
                            send "&f» &cReason: &c&l%arg-2%"
                            send "&f» &c&laccept the report with /report (reported-player) accept"
                            send "                    {@report}"
                            set {report.%arg-1%.notaccept} to false
                            set {report.%arg-1%.reportedplayer} to "%arg-1%"
                if arg 2 is "Griefing":
                    message "{@report} &c&lYou have successfully reported the player"
                    set {report.%arg-1%.from.%player%.accept} to false
                    loop all players:
                        if loop-player has permission "System.report.controll":
                            send "                    {@report}"
                            send "&f» &cReporter: &c&l%player%"
                            send "&f» &cReported player: &c&l%arg-1%"
                            send "&f» &cReason: &c&l%arg-2%"
                            send "&f» &c&laccept the report with /report (reported-player) &c&laccept"
                            send "                    {@report}"
                            set {report.%arg-1%.notaccept} to false
                            set {report.%arg-1%.reportedplayer} to "%arg-1%"
                if arg 1 is a player:
                    if arg 2 is "accept":  
                        if {report.%arg-1%.reportedplayer} is not "%arg-1%":
                            message "{@report} &c&lThis report is already being processed or it &c&ldoes not exist"
                            if {report.%arg-1%.notaccept} is true:
                                message "{@report} &c&lThis report is already being processed or it &c&ldoes not exist"
                        if {report.%arg-1%.reportedplayer} is "%arg-1%":
                            if {report.%arg-1%.notaccept} is false:
                                if player has permission "System.report.controll":  
                                    if player has permission "System.report.controll":
                                        set {report.mod.%player%} to "%player%"
                                        set {report.accept.position.%player%} to location of player
                                        hide the player from all players
                                        set player's gamemode to creative
                                        send " "
                                        send "&f» &c&lYou have accepted the report you will be &c&ltransferred to the"
                                        send "&f» &c&lvanish and teleported to the player with /report &c&lend you will"
                                        send "&f» &c&lend the processingof the report and will be &c&lreset &c&lto your"
                                        send "&f» &c&lprevious position"
                                        send " "
                                        make player execute command "/tp %arg-1%"
                    if arg 2 is "end":
                        if {report.mod.%player%} is not "%player%":
                            message "{@report} &c&lYou are not editing this report"
                        if {report.mod.%player%} is "%player%":
                            if player has permission "System.report.controll":
                                teleport player to {report.accept.position.%player%}
                                delete {report.accept.position.%player%}
                                delete {report.%arg-1%.reportedplayer}
                                delete {report.%arg-1%.notaccept}          
                                reveal the player from all players
                                message "&c&lYou have successfully completed the report"
                                wait 10 seconds
                                delete {report.mod.%player%}
                                set player's gamemode to survival
    #
    #Enderchest command
    #                          
    command /ec:
        trigger:
            open player's ender chest for the player
            message "{@Prefix} &7Enderchest has opened"
    #
    #Chat System
    #-disnabled

    #on chat:
    #    if player has permission "System.rang.Owner":
    #        cancel event
    #        broadcast "&4Owner &7• &4%player% &f» &7%message%"
    #        stop
    #    if player has permission "System.rang.Admin":
    #        cancel event
    #        broadcast "&cAdmin &7• &c%player% &f» &7%message%"
    #        stop
    #    if player has permission "System.rang.Moderator":
    #        cancel event
    #        broadcast "&1Mod &7• &1%player% &f» &7%message%"
    #        stop
    #    if player has permission "System.rang.Developer":
    #        cancel event
    #        broadcast "&bDev &7• &b%player% &f» &7%message%"
    #        stop
    #    if player has permission "System.rang.Supporter":
    #        cancel event
    #        broadcast "&9Sup &7• &9%player% &f» &7%message%"
    #        stop
    #    else:
    #        cancel event
    #        broadcast "&7Player &7• &7%player% &f» &7%message%"
    #        stop

    #
    #Death Counter
    #
    on death:
        add 1 to {death.count.%player%}
        set death message to "{@Prefix} &9%player% &7was killed by &9%attacker's nickname%"
        send "{@Prefix} &7You were killed by &9%attacker's nickname%" to player
        send "{@Prefix} &7Attackers hearts &9%attacker's health%&c❤" to player
        send "{@Prefix} &7You killed &9%player's nickname%" to attacker
       

    command /deathcount [<text>] [<offline player>]:
        trigger:
            if arg 1 is not set:
                if {death.count.%player%} is set:
                    message "{@Prefix} &cDeaths &c&l%{death.count.%player%}%"
                if {death.count.%player%} is not set:
                    message "{@Prefix} &cDeaths &c&l0"
            if arg 1 is "reset":
                if arg 2 is set:
                    if player has permission "System.deathcount.reset":
                        delete {death.count.%arg-2%}
                        message "{@Prefix} &7The death counter was successfully reset"
                    else:
                        send "{@Prefix} {@Noperm}"
                else:
                    send "{@Prefix} &7Correct usage /deathcount (reset | player)"
    3771053.jpg

    Functions:

    Tpasystem
    Bansystem
    Chatclear
    Setspawn
    vanish
    teamchat
    report System
    ec
    deathcount

    Commands:
    / tpa (Player)
    / tpaccept
    / tpdeny

    / ban (Player) (Reason)
    / unban (Player)
    / baninfo (Player)
    / kick (Player) ( Reason )

    / chatclear

    / setspawn
    /spawn

    /vanish / v

    /gm 0/1/2/3

    /fly on/off

    /discord
    /teamspeak

    /broadcast (text)

    /teamchat (login/logout/)
    /teamchat <text>

    /report (player) (reason)
    /report (player) accept
    /report (player) end

    /ec

    /deathcount


    Permissions:


    ban - System.ban
    unban - System.unban
    baninfo - System.baninfo
    kick - System.kick

    Chatclear - System.chatclear

    Setspawn - System.setspawn

    vanish - System.vanish

    gamemode - System.gamemode


    fly - System.fly

    broadcast - System.broadcast


    Teamchat - System.teamchat

    report accept/end etc. - System.report.controll


    Required:

    - Skript
    - Script download:

    https://github.com/SkriptLang/Skript/releases
    -SkQuery
    https://www.spigotmc.org/resources/skquery-1-9-1-16.36631/
    simondev likes this.

Recent Updates

  1. Bugfixes and more
  2. Report and Teamchat update
  3. Blockages and more