Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##########################################################################################
- # optifinedev is sexy #
- ##########################################################################################
- #=======
- #OPTIONS
- #=======
- options:
- prefix: &5[&6SkriptBans&5]
- #messages:
- firstkickmsgtempban: {@prefix}%nl%&c&lYou've been banned temporarily from our server!%nl%&c&lTime: &f%{db_.time.%player's UUID%}%&e%nl%&c&lAuthor: &f%{db_.rubynetwork.author.%player's UUID%}%%nl%&c&lExpires in:&f %{_db_.timecheck}%%nl%&c&lReason:&f %{db_.reason.%player's UUID%}% #message when user is first kicked
- joinkickmsg: {@prefix}%nl%&c&lYou've been banned temporarily from our server!%nl%&c&lTime: &f%{db_.time.%player's UUID%}%&e%nl%&c&lAuthor: &f%{db_.rubynetwork.author.%player's UUID%}%%nl%&c&lExpires in:&f %{_db_.timecheck}%%nl%&c&lReason:&f %{db_.reason.%player's UUID%}% #message everytime user attempts to relog during tempban
- banmsg: &eYou have been banned!%nl%Reason: %{reason.%player's UUID%}% #ban message
- #permissions:
- tempperm: beast.tempban #permission for /tempban and /untempban
- banperm: beast.permban #permission for /ban and /unban
- bancheck: beast.permchecker #permission for /bancheck
- tempcheck: beast.tempchecker #permission for /tempcheck
- #Log(MUST end in .log to be read correctly.... and remember to create a logs folder in skript)
- permlog: permbans.log #logs everytime someone is perm banned to specified text file
- permlogmsgreason: %player% has banned %arg 1% for %arg 2% #log message when a player is perm banned
- permlogmsg: %player% has banned %arg 1% for There is no reason set for your ban!
- templog: tempbans.log #logs everytime someone is temp banned to specified text file
- templogmsg: %player% has banned %arg 1% for %arg 2% time: %arg 3% #log message when a player is temp banned
- permpardon: permpardon.log #logs everytime a perm ban is pardoned to specified text file
- permlogpardon: %player% has pardoned %arg 1% #log message when a perm banned player is pardoned
- temppardon: temppardon.log #logs everytime a temp ban is pardoned to specified text file
- templogpardon: %player% has unbanned %arg 1% #log message when a temp banned player is pardoned
- on load:
- send "&cSkriptBans &ahas been &a&lENABLED" to console
- send "&cSkriptBans &aCreated by: &6MasterHunter2003" to console
- on unload:
- send "&cSkriptBans &ahas been &c&lDISABLED" to console
- #===
- #BAN
- #===
- command /ban <offlineplayer> [<text>]:
- permission: {@banperm}
- usage: /ban [player] [<reasoning>]
- trigger:
- if {banned.%arg 1%} is true:
- message "&cThis player is already banned!"
- stop
- else:
- if arg 2 is set:
- set {db_.reason.%arg 1's UUID%} to arg 2
- kick arg 1 due to "{@banmsg}"
- set {db_.banned.%arg 1's UUID%} to true
- message "&cYou have banned &e%arg 1%&c! Reason: %{db_.reason.%arg 1's UUID%}%" to player
- log "THERE IS A REASON SET IN THIS BAN!" to "{@permlog}"
- log "{@permlogmsgreason}" to "{@permlog}"
- else if arg 2 isn't set:
- set {db_.reason.%arg 1's UUID%} to "&cThere is no reason set for your ban!"
- set {db_.banned.%arg 1's UUID%} to true
- kick arg 1 due to "{@banmsg}"
- broadcast "&cYou have banned &e%arg 1%&c! Reason: You haven't entered a reason for this ban!"
- log "NO REASON SET IN THIS BAN!" to "{@permlog}"
- log "{@permlogmsg}" to "{@permlog}"
- command /unban <offlineplayer>:
- permission: {@banperm}
- aliases: /pardon, /unb
- usage: /unban [player]
- trigger:
- if {db_.banned.%arg 1's UUID%} is true:
- set {db_.banned.%arg 1's UUID%} to false
- message "&eThe ban for &a%arg 1% &ehas been lifted!"
- log "{@permlogpardon}" to "{@permpardon}"
- stop
- else:
- message "&cThis player is NOT banned!"
- #======
- #BAN-IP #NOT WORKING........YET
- #======
- #command /ipban <offlineplayer>:
- # permission: {@banperm}
- # aliases: /ban-ip, /banip, /ip-ban
- # usage: /ipban [ip address]
- # trigger:
- # if arg 1 is banned:
- # message "&cThis ip is already ip-banned!"
- # stop
- # if arg 1 is not banned:
- # kick arg 1 due to "{@banmsg} &cFor: &a%arg 2%"
- # ban the IP-address of arg 1
- # message "&cYou have ip-banned &e%IP of arg 1% &e(%arg 1%&e)&c!"
- #===========
- #BAN CHECKER
- #===========
- command /bancheck <offlineplayer>:
- permission: {@bancheck}
- aliases: /bcheck, /banc
- usage: /bancheck [player]
- trigger:
- if arg 1 is banned:
- message "&e%arg 1% &9is banned."
- stop
- else:
- message "&e%arg 1% &9is not banned."
- stop
- #===========
- #TEMPBAN CHECKER
- #===========
- command /tempcheck <offlineplayer>:
- permission: {@tempcheck}
- aliases: /tcheck, /tempc
- usage: /tempcheck [player]
- trigger:
- if {kickmsg.%arg 1's UUID%} is true:
- message "&e%arg 1% &9is temp-banned."
- stop
- else:
- message "&e%arg 1% &9is not temp-banned."
- #=======
- #TEMPBAN
- #=======
- #the timespan for example is 1 minute, 3 hours, or 52 days...etc
- command /tempban <offlineplayer> <text> <timespan>:
- permission: {@tempperm}
- aliases: /tban, /temp
- usage: /tempban [player] [reason] [timespan]
- trigger:
- set {db_.kickmsg.%arg 1's UUID%} to true
- set {db_.time.%arg 1's UUID%} to arg 3
- kick the arg 1 due to "{@firstkickmsgtempban}"
- set {db_.ban.%arg 1's UUID%} to now
- log "{@templogmsg}" to "{@templog}"
- set {db_.reason.%arg 1's UUID%} to arg 2
- set {db_.rubynetwork.author.%arg 1's UUID%} to player
- command /untempban <offlineplayer>:
- permission: {@tempperm}
- aliases: /untemp, unt
- usage: /untempban [player]
- trigger:
- if {db_.kickmsg.%arg 1's UUID%} is true:
- set {db_.time.%arg 1's UUID%} to now
- message "&eThe ban for &a%arg 1% &ehas been lifted!"
- set {db_.kickmsg.%arg 1's UUID%} to false
- log "{@templogpardon}" to "{@temppardon}"
- clear {reason.%arg 1's UUID%}
- else:
- message "&cThis player is NOT banned!"
- #===================
- #LOGIN LOGOUT EVENTS
- #===================
- on quit:
- if {db_.kickmsg.%player's UUID%} is true:
- set leave message to ""
- on connect:
- if {db_.time.%player's UUID%} is set:
- set {_tempban} to difference between now and {db_.ban.%player's UUID%}
- reduce {_tempban} by {db_.time.%player's UUID%}
- if difference between now and {db_.ban.%player's UUID%} is bigger than {db_.time.%player's UUID%}:
- clear {db_.ban.%player's UUID%}
- clear {db_.time.%player's UUID%}
- if difference between now and {db_.ban.%player's UUID%} is smaller than {db_.time.%player's UUID%}:
- set {_donetime} to {db_.ban.%player's UUID%}
- add {db_.time.%player's UUID%} to {_donetime}
- set {_db_.timecheck} to difference between now and {_donetime}
- kick the player due to "{@joinkickmsg}"
- else if {db_.banned.%player's UUID%} is true:
- wait 1 tick
- kick the player due to "{@banmsg}"
- #===============
- #EVERYTHING ELSE
- #===============
- command /skriptbans:
- trigger:
- json("%player%", "&cUse /ban to ban someone||ttp:&cClick here to ban someone!||sgt:/ban ")
- json("%player%", "&cUse /unban to unban someone||ttp:&cClick here to unban someone!||sgt:/unban ")
- json("%player%", "&cUse /bancheck to check if someone is banned||ttp:&cClick here to check the ban of someone||sgt:/bancheck ")
- json("%player%", "&cUse /tempcheck to check if someone is temp-banned||ttp:&cClick here to check the temp-ban of someone||sgt:/tempcheck ")
- json("%player%", "&cUse /tempban to tempban someone||ttp:&cClick here to tempban someone!||sgt:/tempban ")
- json("%player%", "&cUse /untempban to untempban someone||ttp:&cClick here to untempban someone!||sgt:/untempban ")
- command /info:
- trigger:
- message "&b=&7------------------&8[&dCredits&8]&7------------------&b="
- message "&aYou are currently running: &e&lSkriptBans v1.1"
- message "&8------------------------------------------="
- message "&bCreated By, &2MasterHunter2003"
- message "&b=&7-------------------------------------------&b="
- #NOTE:
- #If ANY errors or glitches are found, feel free to send me a message on the forum or privately... or fix it if you can :)
- #===============================================================================
- # ------ |\ | ------- /-----\ \ / / / /\ /\
- # | | \ | | | | \ / \ \ \/ \/
- # } ---- | \ | | | | \/ / / /
- # | | \ | \ / | | / /\ /\
- # ------- | \| \--/ \-----/ / \/ \/ \_______/
- #===============================================================================
- # YOU ARE ALLOWED TO CHANGE THIS FILE, BUT YOU'RE NOT ALLOWED TO DISTRIBUTE THIS OR CREDIT YOURSELF
Advertisement
Add Comment
Please, Sign In to add comment