Advertisement
70sOn7

Bans

Mar 14th, 2018
1,126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.99 KB | None | 0 0
  1. #--------------------------------------------------------------------------------
  2. # (Ban Skript)
  3. # Credit: 70sOn7
  4. #
  5. # Do not claim this, as it is public and made by me.
  6. #
  7. # Commands:
  8. #
  9. # /ban - Bans a player
  10. # /ac - Shows all AntiCheat Related options
  11. #
  12. #
  13. #
  14. # Dependencies:
  15. #
  16. # Skript
  17. # (https://dev.bukkit.org/projects/skript)
  18. #
  19. #
  20. #
  21. # Contact Me:
  22. #
  23. # Something wrong? Contact me via discord, 70sOn7#9245
  24. # Also I would love suggestions on other things to do!
  25. #
  26. # [This Part Affects Nothing]
  27. #--------------------------------------------------------------------------------
  28.  
  29. # Customization Options
  30.  
  31. #------------------------------------------------------------------------------
  32. # Customize these as these are the main essentials you'll use for this!
  33. #
  34. #<><><><><><><><><><><><><><><><><><>
  35. options:
  36. servername: ServerNameHere
  37. command: BanCommand
  38. command2: BanCommand2
  39. banpermission: BanPermission
  40. acpermission: AcPermission
  41. blacklistpermission: BlackListPermission
  42. command3: BlackListCommand
  43. # DO NOT CHANGE
  44. version: 1.1
  45. #<><><><><><><><><><><><><><><><><><>
  46. #
  47. # Put your server name where it says "ServerNameHere"
  48. # Put the command to ban people where it says "BanCommand"
  49. # Put another command to ban people where "BanCommand2" If you just want one command. Leave it blank!
  50. # Put your permission you want for the command in "BanPermission" place
  51. # Put your AntiCheat Notify permission in "AcPermission"
  52. # Put a command you blacklist people with in "BlackListCommand"
  53. #--------------------------------------------------------------------------------
  54.  
  55. on join:
  56. set {_ver} to text from URL "https://pastebin.com/raw/dgtXejHS"
  57. if "%{_ver}%" is not equal to "%{@version}%":
  58. send ""
  59. send "&e(Ban Skript)"
  60. send " &7By: 70sOn7"
  61. send " &7Current Version: {@version}"
  62. send " &7Newest Version: &aAvailable"
  63. send " &7Link: <link:https://pastebin.com/dgtXejHS>&bhttps://pastebin.com/raw/dgtXejHS<reset>"
  64. send ""
  65.  
  66. command /{@command3} [<offlineplayer>] [<text>]:
  67. trigger:
  68. if player has permission "{@blacklistpermission}":
  69. if arg-1 is not set:
  70. send "&e/blacklist (Player) (Reason)"
  71. stop
  72. if arg-2 is not set:
  73. send "&e/blacklist (Player) (Reason)"
  74. stop
  75. if arg-1 is set:
  76. if arg-2 is set:
  77. broadcast "&e%player% &7has &oblacklisted &e%arg-1% &7for &e%arg-2% &e[FOREVER]"
  78. kick arg-1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-2%%nl%"
  79. IP ban arg-1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-2%%nl%"
  80. else:
  81. send "&cYou dont have permission for this command!"
  82.  
  83. command /{@command} [<offlineplayer>] [<number>] [<text>] [<text>]:
  84. aliases: {@command2}
  85. trigger:
  86. if player has permission "{@banpermission}":
  87. if arg-1 is not set:
  88. send "&e/ban (Player) (Integer) (Time Amount) (Reason)"
  89. send " &7Ex: /ban Timmy103 3 Days Disrespect"
  90. stop
  91. if arg-2 is not set:
  92. send "&e/ban (Player) (Integer) (Time Amount) (Reason)"
  93. send " &7Ex: /ban Timmy103 3 Days Disrespect"
  94. stop
  95. if arg-3 is not set:
  96. send "&e/ban (Player) (Integer) (Time Amount) (Reason)"
  97. send " &7Ex: /ban Timmy103 3 Days Disrespect"
  98. stop
  99. if arg-4 is not set:
  100. send "&e/ban (Player) (Integer) (Time Amount) (Reason)"
  101. send " &7Ex: /ban Timmy103 3 Days Disrespect"
  102. stop
  103. if command sender is console:
  104. set {pec} to "CONSOLE"
  105. if command sender is player:
  106. set {pec} to player
  107. if arg-3 is "s" or "second" or "seconds":
  108. set {tn.%arg-1%} to arg 2
  109. set {bd.%arg-1%} to now
  110. broadcast "&e%{pec}% &7has banned &e%arg-1% &7for &e%arg-4% &e[%arg-2% SECONDS]"
  111. kick arg-1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% SECONDS"
  112. ban arg-1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% SECONDS"
  113. add arg 1 to {bps::*}
  114. if arg-3 is "m" or "minute" or "minutes":
  115. set {tn.%arg-1%} to arg 2 * 60
  116. set {bd.%arg-1%} to now
  117. broadcast "&e%{pec}% &7has banned &e%arg-1% &7for &e%arg-4% &e[%arg-2% MINUTES]"
  118. kick arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% MINUTES"
  119. ban arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% MINUTES"
  120. add arg 1 to {bps::*}
  121. if arg-3 is "h" or "hour" or "hours":
  122. set {tn.%arg-1%} to arg 2 * 3600
  123. set {bd.%arg-1%} to now
  124. broadcast "&e%{pec}% &7has banned &e%arg-1% &7for &e%arg-4% &e[%arg-2% HOURS]"
  125. kick arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% HOURS"
  126.  
  127. ban arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% HOURS"
  128. add arg 1 to {bps::*}
  129. if arg-3 is "d" or "day" or "days":
  130. set {tn.%arg-1%} to arg 2 * 86400
  131. set {bd.%arg-1%} to now
  132. broadcast "&e%{pec}% &7has banned &e%arg-1% &7for &e%arg-4% &e[%arg-2% DAYS]"
  133. ban arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% DAYS"
  134. kick arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% DAYS"
  135. add arg 1 to {bps::*}
  136. if arg-3 is "w" or "week" or "weeks":
  137. set {tn.%arg-1%} to arg 2 * 604800
  138. set {bd.%arg-1%} to now
  139. broadcast "&e%{pec}% &7has banned &e%arg-1% &7for &e%arg-4% &e[%arg-2% WEEKS]"
  140. ban arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% WEEKS"
  141. kick arg 1 due to "&eBanned from {@servername}!%nl%%nl% &eReason: &7%arg-4%%nl% &eBan Date: %{bd.%arg-1%}%%nl%&e Durration: &e%arg-2% WEEKS"
  142. add arg 1 to {bps::*}
  143. else:
  144. send "&cSorry, &7You dont have permission for this command!"
  145.  
  146. on join:
  147. if player has permission "@{permission}":
  148. send " &7Currently running &eSevenBans v1.1"
  149. send " &7Any future updates will be posted!"
  150. play raw sound "entity.experience_orb.pickup" at player with pitch 1 volume 10
  151.  
  152. every second:
  153. loop {bps::*}:
  154. remove 1 from {tn.%loop-value%}
  155. if {tn.%loop-value%} is 0:
  156. remove loop-value from {bps::*}
  157. unban loop-value
  158.  
  159. #
  160. #
  161. # (Anti Cheat)
  162. # Flight
  163. # Reach
  164. #
  165.  
  166. variables:
  167. {Detect.Reach} = true
  168. {Detect.Flight} = true
  169. {Detect.Fastmine} = true
  170.  
  171. command /ac [<text>] [<text>]:
  172. permission: {@acpermission}
  173. permission message: &cSorry, &7You dont have permission for this command!
  174. trigger:
  175. if arg-1 is not set:
  176. send " &c&nAntiCheat&r "
  177. send ""
  178. send "&c/ac toggle &7- Toggles AC messages"
  179. send "&c/ac (disable/enable) (Type Of Hack) &7- Toggles a detect of a hack"
  180. send "&c/ac link &7- Give pastebin link"
  181. stop
  182. if arg-1 is "toggle":
  183. if {ac.%player%} is not set:
  184. send "&7Toggled &cAntiCheat Notifications &7On!"
  185. set {ac.%player%} to true
  186. stop
  187. if {ac.%player%} is true:
  188. send "&7Toggled &cAntiCheat Notifications &7Off!"
  189. delete {ac.%player%}
  190. stop
  191. if arg-1 is "disable":
  192. if arg-2 is not set:
  193. send "&cDetect Types: &7Flight, Reach, Fastmine"
  194. stop
  195. else:
  196. if arg-2 is not "Flight" or "Reach" or "Fastmine":
  197. send "&cDetect Types: &7Flight, Reach, Fastmine"
  198. stop
  199. else:
  200. if arg-2 is "Flight":
  201. set {Detect.Flight} to false
  202. send "&4[AC] &7Turned Flight Detect off"
  203. stop
  204. if arg-2 is "Reach":
  205. set {Detect.Reach} to false
  206. send "&4[AC] &7Turned Reach Detect off"
  207. stop
  208. if arg-2 is "Fastmine":
  209. set {Detect.Fastmine} to false
  210. send "&4[AC] &7Turned Fastmine Detect off"
  211. stop
  212. if arg-1 is "enable":
  213. if arg-2 is not set:
  214. send "&cDetect Types: &7Flight, Reach, Fastmine"
  215. stop
  216. else:
  217. if arg-2 is not "Flight" or "Reach" or "Fastmine":
  218. send "&cDetect Types: &7Flight, Reach, Fastmine"
  219. stop
  220. else:
  221. if arg-2 is "Flight":
  222. set {Detect.Flight} to true
  223. send "&4[AC] &7Turned Flight Detect on"
  224. stop
  225. if arg-2 is "Reach":
  226. set {Detect.Reach} to true
  227. send "&4[AC] &7Turned Reach Detect on"
  228. stop
  229. if arg-2 is "Fastmine":
  230. set {Detect.Fastmine} to true
  231. send "&4[AC] &7Turned Fastmine Detect on"
  232. stop
  233. if arg-1 is "link":
  234. send "&cLink: <link:https://pastebin.com/dgtXejHS>&7https://pastebin.com/edit/dgtXejHS<reset>"
  235.  
  236. on any movement:
  237. {Detect.Flight} is true
  238. player's gamemode is not creative:
  239. if player's flight mode is false:
  240. if entity is player:
  241. set {%player%.yy} to player's altitude
  242. set {_block} to block at player
  243. set {_block2} to block under {_block}
  244. if {_block2} is not air:
  245. set {%player%.fly} to false
  246. stop
  247. else:
  248. wait 2 ticks
  249. set {_block} to block at player
  250. set {_bpos} to block at player
  251. set {_block2} to block under {_block}
  252. if {_block2} is air or sugar cane:
  253. if {%player%.yy} is less than or equal to player's altitude:
  254. wait 4 ticks
  255. if {%player%.yy} is less than or equal to player's altitude:
  256. set {_block} to block at player
  257. set {_block2} to block under {_block}
  258. if {_block2} is air or sugar cane:
  259. wait 2 ticks
  260. if {%player%.yy} is less than or equal to player's altitude:
  261. wait 3 ticks
  262. if {%player%.yy} is less than or equal to player's altitude:
  263. set {_block} to block at player
  264. set {_block2} to block under {_block}
  265. if {_block2} is air or sugar cane:
  266. set {%player%.fly} to true
  267. teleport player to {_bpos}
  268. delete {ok.novalue}
  269. add 1 to {notify.flight.%player%}
  270. if {notify.flight.%player%} is 4:
  271. loop all players:
  272. if loop-player has permission "{@acpermission}":
  273. wait 10 ticks
  274. {ac.%loop-player%} is true
  275. send "&4[AC] &c%player% &7is flying! &c[COULD BE BLOCK LAG]" to loop-player
  276. delete {notify.flight.%player%}
  277. else:
  278. set {%player%.fly} to false
  279.  
  280. on damage:
  281. {Detect.Reach} is true
  282. attacker is a player
  283. victim is a player
  284. projectile doesn't exist
  285. set {_fl} to distance between attacker and victim
  286. if distance between attacker and victim is greater than 3.4:
  287. loop all players:
  288. if loop-player has permission "{@acpermission}":
  289. {ac.%loop-player%} is true
  290. send "&4[S7] &c%attacker% &7hit from &c%{_fl}% blocks &7away" to loop-player
  291.  
  292. on damage:
  293. {Detect.Killaura} is true
  294. if victim is not facing east:
  295. if attacker is not facing west:
  296. attacker is player
  297. projectile doesn't exist
  298. set {_py} to yaw of attacker
  299. set {_dy1} to 50 + {_py}
  300. set {_dy2} to {_py} - 50
  301. set {_vy} to yaw of victim
  302. if {_vy} is not in between {_dy1} and {_dy2}
  303. add 1 to {notify.killaura.%attacker%}
  304. {notify.killaura.%attacker%} is 3
  305. loop all players:
  306. if loop-player has permission "{@acpermission}":
  307. send "&4[AC] &c%attacker% &7might be using KillAura!"
  308. if victim is not facing north:
  309. if attacker is not facing east:
  310. attacker is player
  311. projectile doesn't exist
  312. set {_py} to yaw of attacker
  313. set {_dy1} to 50 + {_py}
  314. set {_dy2} to {_py} - 50
  315. set {_vy} to yaw of victim
  316. if {_vy} is not in between {_dy1} and {_dy2}
  317. add 1 to {notify.killaura.%attacker%}
  318. {notify.killaura.%attacker%} is 3
  319. loop all players:
  320. if loop-player has permission "{@acpermission}":
  321. send "&4[AC] &c%attacker% &7might be using KillAura!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement