SkillAuraIsBae

Untitled

Oct 11th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.60 KB | None | 0 0
  1. ##########################################################################################
  2. # optifinedev is sexy #
  3. ##########################################################################################
  4.  
  5. #=======
  6. #OPTIONS
  7. #=======
  8.  
  9. options:
  10. prefix: &5[&6SkriptBans&5]
  11. #messages:
  12. 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
  13. 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
  14. banmsg: &eYou have been banned!%nl%Reason: %{reason.%player's UUID%}% #ban message
  15. #permissions:
  16. tempperm: beast.tempban #permission for /tempban and /untempban
  17. banperm: beast.permban #permission for /ban and /unban
  18. bancheck: beast.permchecker #permission for /bancheck
  19. tempcheck: beast.tempchecker #permission for /tempcheck
  20. #Log(MUST end in .log to be read correctly.... and remember to create a logs folder in skript)
  21. permlog: permbans.log #logs everytime someone is perm banned to specified text file
  22. permlogmsgreason: %player% has banned %arg 1% for %arg 2% #log message when a player is perm banned
  23. permlogmsg: %player% has banned %arg 1% for There is no reason set for your ban!
  24.  
  25. templog: tempbans.log #logs everytime someone is temp banned to specified text file
  26. templogmsg: %player% has banned %arg 1% for %arg 2% time: %arg 3% #log message when a player is temp banned
  27.  
  28. permpardon: permpardon.log #logs everytime a perm ban is pardoned to specified text file
  29. permlogpardon: %player% has pardoned %arg 1% #log message when a perm banned player is pardoned
  30.  
  31. temppardon: temppardon.log #logs everytime a temp ban is pardoned to specified text file
  32. templogpardon: %player% has unbanned %arg 1% #log message when a temp banned player is pardoned
  33.  
  34. on load:
  35. send "&cSkriptBans &ahas been &a&lENABLED" to console
  36. send "&cSkriptBans &aCreated by: &6MasterHunter2003" to console
  37.  
  38. on unload:
  39. send "&cSkriptBans &ahas been &c&lDISABLED" to console
  40.  
  41. #===
  42. #BAN
  43. #===
  44.  
  45. command /ban <offlineplayer> [<text>]:
  46. permission: {@banperm}
  47. usage: /ban [player] [<reasoning>]
  48. trigger:
  49. if {banned.%arg 1%} is true:
  50. message "&cThis player is already banned!"
  51. stop
  52. else:
  53. if arg 2 is set:
  54. set {db_.reason.%arg 1's UUID%} to arg 2
  55. kick arg 1 due to "{@banmsg}"
  56. set {db_.banned.%arg 1's UUID%} to true
  57. message "&cYou have banned &e%arg 1%&c! Reason: %{db_.reason.%arg 1's UUID%}%" to player
  58. log "THERE IS A REASON SET IN THIS BAN!" to "{@permlog}"
  59. log "{@permlogmsgreason}" to "{@permlog}"
  60. else if arg 2 isn't set:
  61. set {db_.reason.%arg 1's UUID%} to "&cThere is no reason set for your ban!"
  62. set {db_.banned.%arg 1's UUID%} to true
  63. kick arg 1 due to "{@banmsg}"
  64. broadcast "&cYou have banned &e%arg 1%&c! Reason: You haven't entered a reason for this ban!"
  65. log "NO REASON SET IN THIS BAN!" to "{@permlog}"
  66. log "{@permlogmsg}" to "{@permlog}"
  67.  
  68. command /unban <offlineplayer>:
  69. permission: {@banperm}
  70. aliases: /pardon, /unb
  71. usage: /unban [player]
  72. trigger:
  73. if {db_.banned.%arg 1's UUID%} is true:
  74. set {db_.banned.%arg 1's UUID%} to false
  75. message "&eThe ban for &a%arg 1% &ehas been lifted!"
  76. log "{@permlogpardon}" to "{@permpardon}"
  77. stop
  78. else:
  79. message "&cThis player is NOT banned!"
  80.  
  81. #======
  82. #BAN-IP #NOT WORKING........YET
  83. #======
  84.  
  85. #command /ipban <offlineplayer>:
  86. # permission: {@banperm}
  87. # aliases: /ban-ip, /banip, /ip-ban
  88. # usage: /ipban [ip address]
  89. # trigger:
  90. # if arg 1 is banned:
  91. # message "&cThis ip is already ip-banned!"
  92. # stop
  93. # if arg 1 is not banned:
  94. # kick arg 1 due to "{@banmsg} &cFor: &a%arg 2%"
  95. # ban the IP-address of arg 1
  96. # message "&cYou have ip-banned &e%IP of arg 1% &e(%arg 1%&e)&c!"
  97.  
  98. #===========
  99. #BAN CHECKER
  100. #===========
  101.  
  102. command /bancheck <offlineplayer>:
  103. permission: {@bancheck}
  104. aliases: /bcheck, /banc
  105. usage: /bancheck [player]
  106. trigger:
  107. if arg 1 is banned:
  108. message "&e%arg 1% &9is banned."
  109. stop
  110. else:
  111. message "&e%arg 1% &9is not banned."
  112. stop
  113.  
  114. #===========
  115. #TEMPBAN CHECKER
  116. #===========
  117.  
  118. command /tempcheck <offlineplayer>:
  119. permission: {@tempcheck}
  120. aliases: /tcheck, /tempc
  121. usage: /tempcheck [player]
  122. trigger:
  123. if {kickmsg.%arg 1's UUID%} is true:
  124. message "&e%arg 1% &9is temp-banned."
  125. stop
  126. else:
  127. message "&e%arg 1% &9is not temp-banned."
  128.  
  129. #=======
  130. #TEMPBAN
  131. #=======
  132.  
  133. #the timespan for example is 1 minute, 3 hours, or 52 days...etc
  134. command /tempban <offlineplayer> <text> <timespan>:
  135. permission: {@tempperm}
  136. aliases: /tban, /temp
  137. usage: /tempban [player] [reason] [timespan]
  138. trigger:
  139. set {db_.kickmsg.%arg 1's UUID%} to true
  140. set {db_.time.%arg 1's UUID%} to arg 3
  141. kick the arg 1 due to "{@firstkickmsgtempban}"
  142. set {db_.ban.%arg 1's UUID%} to now
  143. log "{@templogmsg}" to "{@templog}"
  144. set {db_.reason.%arg 1's UUID%} to arg 2
  145. set {db_.rubynetwork.author.%arg 1's UUID%} to player
  146.  
  147. command /untempban <offlineplayer>:
  148. permission: {@tempperm}
  149. aliases: /untemp, unt
  150. usage: /untempban [player]
  151. trigger:
  152. if {db_.kickmsg.%arg 1's UUID%} is true:
  153. set {db_.time.%arg 1's UUID%} to now
  154. message "&eThe ban for &a%arg 1% &ehas been lifted!"
  155. set {db_.kickmsg.%arg 1's UUID%} to false
  156. log "{@templogpardon}" to "{@temppardon}"
  157. clear {reason.%arg 1's UUID%}
  158. else:
  159. message "&cThis player is NOT banned!"
  160.  
  161. #===================
  162. #LOGIN LOGOUT EVENTS
  163. #===================
  164.  
  165. on quit:
  166. if {db_.kickmsg.%player's UUID%} is true:
  167. set leave message to ""
  168.  
  169. on connect:
  170. if {db_.time.%player's UUID%} is set:
  171. set {_tempban} to difference between now and {db_.ban.%player's UUID%}
  172. reduce {_tempban} by {db_.time.%player's UUID%}
  173. if difference between now and {db_.ban.%player's UUID%} is bigger than {db_.time.%player's UUID%}:
  174. clear {db_.ban.%player's UUID%}
  175. clear {db_.time.%player's UUID%}
  176. if difference between now and {db_.ban.%player's UUID%} is smaller than {db_.time.%player's UUID%}:
  177. set {_donetime} to {db_.ban.%player's UUID%}
  178. add {db_.time.%player's UUID%} to {_donetime}
  179. set {_db_.timecheck} to difference between now and {_donetime}
  180. kick the player due to "{@joinkickmsg}"
  181. else if {db_.banned.%player's UUID%} is true:
  182. wait 1 tick
  183. kick the player due to "{@banmsg}"
  184.  
  185. #===============
  186. #EVERYTHING ELSE
  187. #===============
  188.  
  189. command /skriptbans:
  190. trigger:
  191. json("%player%", "&cUse /ban to ban someone||ttp:&cClick here to ban someone!||sgt:/ban ")
  192. json("%player%", "&cUse /unban to unban someone||ttp:&cClick here to unban someone!||sgt:/unban ")
  193. json("%player%", "&cUse /bancheck to check if someone is banned||ttp:&cClick here to check the ban of someone||sgt:/bancheck ")
  194. json("%player%", "&cUse /tempcheck to check if someone is temp-banned||ttp:&cClick here to check the temp-ban of someone||sgt:/tempcheck ")
  195. json("%player%", "&cUse /tempban to tempban someone||ttp:&cClick here to tempban someone!||sgt:/tempban ")
  196. json("%player%", "&cUse /untempban to untempban someone||ttp:&cClick here to untempban someone!||sgt:/untempban ")
  197.  
  198. command /info:
  199. trigger:
  200. message "&b=&7------------------&8[&dCredits&8]&7------------------&b="
  201. message "&aYou are currently running: &e&lSkriptBans v1.1"
  202. message "&8------------------------------------------="
  203. message "&bCreated By, &2MasterHunter2003"
  204. message "&b=&7-------------------------------------------&b="
  205.  
  206. #NOTE:
  207. #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 :)
  208.  
  209. #===============================================================================
  210. # ------ |\ | ------- /-----\ \ / / / /\ /\
  211. # | | \ | | | | \ / \ \ \/ \/
  212. # } ---- | \ | | | | \/ / / /
  213. # | | \ | \ / | | / /\ /\
  214. # ------- | \| \--/ \-----/ / \/ \/ \_______/
  215. #===============================================================================
  216.  
  217. # 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