Advertisement
Rqdioqctivev

Punish GUI [Release 1.3]

Jan 24th, 2020
1,022
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.65 KB | None | 0 0
  1. command /punish <offlineplayer> [<text>]:
  2. permission: skript.punish
  3. permission message: &cInsufficient permissions!
  4. usage: &c/punish <player> (reason)
  5. trigger:
  6. set {punisher::%player%} to arg-1
  7. set {reason::%player%} to arg-2
  8. punish(player, "main")
  9.  
  10. function punish(p: Player, page: String):
  11. if {_page} = "main":
  12. set {setbantimeseconds::%{_p}%} to 0
  13. set {setbantimeminutes::%{_p}%} to 0
  14. set {setbantimehours::%{_p}%} to 0
  15. set {setbantimedays::%{_p}%} to 0
  16. set {setbantimeweeks::%{_p}%} to 0
  17. set {setbantimemonths::%{_p}%} to 0
  18. set {setbantimeyears::%{_p}%} to 0
  19. set {setmutetimeseconds::%{_p}%} to 0
  20. set {setmutetimeminutes::%{_p}%} to 0
  21. set {setmutetimehours::%{_p}%} to 0
  22. set {setmutetimedays::%{_p}%} to 0
  23. set {setmutetimeweeks::%{_p}%} to 0
  24. set {setmutetimemonths::%{_p}%} to 0
  25. set {setmutetimeyears::%{_p}%} to 0
  26. open virtual chest inventory with size 4 named "&3Punishment GUI" to {_p}
  27. set {_a} to 27
  28. loop 9 times:
  29. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  30. add 1 to {_a}
  31. format gui slot 10 of {_p} with red concrete named "&cBan Options" with lore "&7View all the player ban options!" to run function punish({_p}, "main_ban")
  32. format gui slot 12 of {_p} with orange concrete named "&6Mute Options" with lore "&7View all the player mute options!" to run function punish({_p}, "main_mute")
  33. format gui slot 14 of {_p} with green concrete named "&2Kick Options" with lore "&7View all the player kick options!" to run function punish({_p}, "main_kick")
  34. format gui slot 16 of {_p} with lime concrete named "&aWarn Options" with lore "&7View all the player warn options!" to run function punish({_p}, "main_warn")
  35. else if {_page} = "main_ban":
  36. open virtual chest inventory with size 4 named "&3Punishment GUI &8- &cMain Ban" to {_p}
  37. set {_a} to 27
  38. loop 9 times:
  39. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  40. add 1 to {_a}
  41. format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &cMain Ban" with lore "&7Return to the main page!" to run function punish({_p}, "main")
  42. format gui slot 12 of {_p} with red concrete named "&cBan Player" to run function punish({_p}, "ban_ban")
  43. format gui slot 14 of {_p} with lime concrete named "&aUnban Player" to run function punish({_p}, "ban_unban")
  44. else if {_page} = "ban_ban":
  45. open virtual chest inventory with size 6 named "&3Punishment GUI &8- &cBan" to {_p}
  46. set {_a} to 45
  47. loop 9 times:
  48. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  49. add 1 to {_a}
  50. format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &cBan" with lore "&7Return to the main ban page!" to run function punish({_p}, "main_ban")
  51. set {_a} to 0
  52. loop 9 times:
  53. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  54. add 1 to {_a}
  55. format gui slot 4 of {_p} with paper named "&cBan Time" with lore "&8[&7%{setbantime::%{_p}%}%]" to run function punish({_p}, "ban_confirm")
  56. format gui slot 10 of {_p} with lime concrete named "&a1 second" with lore "&7Add 1 second to the ban time!" to close:
  57. add 1 to {setbantimeseconds::%{_p}%}
  58. setTempBanTime({_p})
  59. punish({_p}, "ban_ban")
  60. format gui slot 19 of {_p} with lime concrete named "&a1 minute" with lore "&7Add 1 minute to the ban time!" to close:
  61. add 1 to {setbantimeminutes::%{_p}%}
  62. setTempBanTime({_p})
  63. punish({_p}, "ban_ban")
  64. format gui slot 28 of {_p} with lime concrete named "&a1 hour" with lore "&7Add 1 hour to the ban time!" to close:
  65. add 1 to {setbantimehours::%{_p}%}
  66. setTempBanTime({_p})
  67. punish({_p}, "ban_ban")
  68. format gui slot 37 of {_p} with lime concrete named "&a1 day" with lore "&7Add 1 day to the ban time!" to close:
  69. add 1 to {setbantimedays::%{_p}%}
  70. setTempBanTime({_p})
  71. punish({_p}, "ban_ban")
  72. format gui slot 11 of {_p} with lime concrete named "&a1 week" with lore "&7Add 1 week to the ban time!" to close:
  73. add 1 to {setbantimeweeks::%{_p}%}
  74. setTempBanTime({_p})
  75. punish({_p}, "ban_ban")
  76. format gui slot 20 of {_p} with lime concrete named "&a1 month" with lore "&7Add 1 month to the ban time!" to close:
  77. add 1 to {setbantimemonths::%{_p}%}
  78. setTempBanTime({_p})
  79. punish({_p}, "ban_ban")
  80. format gui slot 29 of {_p} with lime concrete named "&a1 year" with lore "&7Add 1 year to the ban time!" to close:
  81. add 1 to {setbantimeyears::%{_p}%}
  82. setTempBanTime({_p})
  83. punish({_p}, "ban_ban")
  84. format gui slot 31 of {_p} with green concrete named "&aFOREVER" with lore "&7Ban the player forever!" to run function punish({_p}, "permban_confirm")
  85. format gui slot 15 of {_p} with lime concrete named "&c1 second" with lore "&7Remove 1 second to the ban time!" to close:
  86. if {setbantimeseconds::%{_p}%} > 0:
  87. remove 1 from {setbantimeseconds::%{_p}%}
  88. setTempBanTime({_p})
  89. punish({_p}, "ban_ban")
  90. format gui slot 24 of {_p} with lime concrete named "&c1 minute" with lore "&7Remove 1 minute to the ban time!" to close:
  91. if {setbantimeminutes::%{_p}%} > 0:
  92. remove 1 from {setbantimeminutes::%{_p}%}
  93. setTempBanTime({_p})
  94. punish({_p}, "ban_ban")
  95. format gui slot 33 of {_p} with lime concrete named "&c1 hour" with lore "&7Remove 1 hour to the ban time!" to close:
  96. if {setbantimehours::%{_p}%} > 0:
  97. remove 1 from {setbantimehours::%{_p}%}
  98. setTempBanTime({_p})
  99. punish({_p}, "ban_ban")
  100. format gui slot 42 of {_p} with lime concrete named "&c1 day" with lore "&7Remove 1 day to the ban time!" to close:
  101. if {setbantimedays::%{_p}%} > 0:
  102. remove 1 from {setbantimedays::%{_p}%}
  103. setTempBanTime({_p})
  104. punish({_p}, "ban_ban")
  105. format gui slot 16 of {_p} with lime concrete named "&c1 week" with lore "&7Remove 1 week to the ban time!" to close:
  106. if {setbantimeweeks::%{_p}%} > 0:
  107. remove 1 from {setbantimeweeks::%{_p}%}
  108. setTempBanTime({_p})
  109. punish({_p}, "ban_ban")
  110. format gui slot 25 of {_p} with lime concrete named "&c1 month" with lore "&7Remove 1 month to the ban time!" to close:
  111. if {setbantimemonths::%{_p}%} > 0:
  112. remove 1 from {setbantimemonths::%{_p}%}
  113. setTempBanTime({_p})
  114. punish({_p}, "ban_ban")
  115. format gui slot 34 of {_p} with lime concrete named "&c1 year" with lore "&7Remove 1 year to the ban time!" to close:
  116. if {setbantimeyears::%{_p}%} > 0:
  117. remove 1 from {setbantimeyears::%{_p}%}
  118. setTempBanTime({_p})
  119. punish({_p}, "ban_ban")
  120. else if {_page} = "permban_confirm":
  121. open virtual chest inventory with size 1 named "&3Punish GUI &8- &cPermanent Ban" to {_p}
  122. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the permanent ban." to close:
  123. console command "/advancedbans:ban %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
  124. broadcast ""
  125. broadcast "&3%{_p}% &bhas banned &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[FOREVER]"
  126. broadcast ""
  127. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the permanent ban." to run function punish({_p}, "ban_ban")
  128. else if {_page} = "ban_confirm":
  129. open virtual chest inventory with size 1 named "&3Punish GUI &8- &cTemporary Ban" to {_p}
  130. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the temporary ban." to close:
  131. console command "/advancedbans:tempban %{punisher::%{_p}%}% %{setbantime::%{_p}%}% -s %{reason::%{_p}%}%"
  132. broadcast ""
  133. broadcast "&3%{_p}% &bhas banned &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[%{setbantime::%{_p}%}%]"
  134. broadcast ""
  135. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the temporary ban." to run function punish({_p}, "ban_ban")
  136. else if {_page} = "ban_unban":
  137. open virtual chest inventory with size 1 named "&3Punish GUI &8- &cUnban" to {_p}
  138. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the unban." to close:
  139. console command "/advancedbans:unban %{punisher::%{_p}%}%"
  140. broadcast ""
  141. broadcast "&3%{_p}% &bhas unbanned &3%{punisher::%{_p}%}%"
  142. broadcast ""
  143. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the unban." to run function punish({_p}, "main_ban")
  144. else if {_page} = "main_mute":
  145. open virtual chest inventory with size 4 named "&3Punishment GUI &8- &6Main Mute" to {_p}
  146. set {_a} to 27
  147. loop 9 times:
  148. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  149. add 1 to {_a}
  150. format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &6Main Mute" with lore "&7Return to the main page!" to run function punish({_p}, "main")
  151. format gui slot 12 of {_p} with red concrete named "&cMute Player" to run function punish({_p}, "mute_mute")
  152. format gui slot 14 of {_p} with lime concrete named "&aUnmute Player" to run function punish({_p}, "mute_unmute")
  153. else if {_page} = "mute_mute":
  154. open virtual chest inventory with size 6 named "&3Punishment GUI &8- &6Mute" to {_p}
  155. set {_a} to 45
  156. loop 9 times:
  157. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  158. add 1 to {_a}
  159. format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &6Mute" with lore "&7Return to the main mute page!" to run function punish({_p}, "main_mute")
  160. set {_a} to 0
  161. loop 9 times:
  162. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  163. add 1 to {_a}
  164. format gui slot 4 of {_p} with paper named "&6Mute Time" with lore "&8[&7%{setmutetime::%{_p}%}%]" to run function punish({_p}, "mute_confirm")
  165. format gui slot 10 of {_p} with lime concrete named "&a1 second" with lore "&7Add 1 second to the mute time!" to close:
  166. add 1 to {setmuteseconds::%{_p}%}
  167. setTempMuteTime({_p})
  168. punish({_p}, "mute_mute")
  169. format gui slot 19 of {_p} with lime concrete named "&a1 minute" with lore "&7Add 1 minute to the mute time!" to close:
  170. add 1 to {setmutetimeminutes::%{_p}%}
  171. setTempMuteTime({_p})
  172. punish({_p}, "mute_mute")
  173. format gui slot 28 of {_p} with lime concrete named "&a1 hour" with lore "&7Add 1 hour to the mute time!" to close:
  174. add 1 to {setmutetimehours::%{_p}%}
  175. setTempMuteTime({_p})
  176. punish({_p}, "mute_mute")
  177. format gui slot 37 of {_p} with lime concrete named "&a1 day" with lore "&7Add 1 day to the mute time!" to close:
  178. add 1 to {setmutetimedays::%{_p}%}
  179. setTempMuteTime({_p})
  180. punish({_p}, "mute_mute")
  181. format gui slot 11 of {_p} with lime concrete named "&a1 week" with lore "&7Add 1 week to the mute time!" to close:
  182. add 1 to {setmutetimeweeks::%{_p}%}
  183. setTempMuteTime({_p})
  184. punish({_p}, "mute_mute")
  185. format gui slot 20 of {_p} with lime concrete named "&a1 month" with lore "&7Add 1 month to the mute time!" to close:
  186. add 1 to {setmutetimemonths::%{_p}%}
  187. setTempMuteTime({_p})
  188. punish({_p}, "mute_mute")
  189. format gui slot 29 of {_p} with lime concrete named "&a1 year" with lore "&7Add 1 year to the mute time!" to close:
  190. add 1 to {setmutetimeyears::%{_p}%}
  191. setTempMuteTime({_p})
  192. punish({_p}, "mute_mute")
  193. format gui slot 31 of {_p} with green concrete named "&aFOREVER" with lore "&7Mute the player forever!" to run function punish({_p}, "permmute_confirm")
  194. format gui slot 15 of {_p} with lime concrete named "&c1 second" with lore "&7Remove 1 second to the mute time!" to close:
  195. if {setmutetimeseconds::%{_p}%} > 0:
  196. remove 1 from {setmutetimeseconds::%{_p}%}
  197. setTempMuteTime({_p})
  198. punish({_p}, "mute_mute")
  199. format gui slot 24 of {_p} with lime concrete named "&c1 minute" with lore "&7Remove 1 minute to the mute time!" to close:
  200. if {setmutetimeminutes::%{_p}%} > 0:
  201. remove 1 from {setmutetimeminutes::%{_p}%}
  202. setTempMuteTime({_p})
  203. punish({_p}, "mute_mute")
  204. format gui slot 33 of {_p} with lime concrete named "&c1 hour" with lore "&7Remove 1 hour to the mute time!" to close:
  205. if {setmutetimehours::%{_p}%} > 0:
  206. remove 1 from {setmutetimehours::%{_p}%}
  207. setTempMuteTime({_p})
  208. punish({_p}, "mute_mute")
  209. format gui slot 42 of {_p} with lime concrete named "&c1 day" with lore "&7Remove 1 day to the mute time!" to close:
  210. if {setmutetimedays::%{_p}%} > 0:
  211. remove 1 from {setmutetimedays::%{_p}%}
  212. setTempMuteTime({_p})
  213. punish({_p}, "mute_mute")
  214. format gui slot 16 of {_p} with lime concrete named "&c1 week" with lore "&7Remove 1 week to the mute time!" to close:
  215. if {setmutetimeweeks::%{_p}%} > 0:
  216. remove 1 from {setmutetimeweeks::%{_p}%}
  217. setTempMuteTime({_p})
  218. punish({_p}, "mute_mute")
  219. format gui slot 25 of {_p} with lime concrete named "&c1 month" with lore "&7Remove 1 month to the mute time!" to close:
  220. if {setmutetimemonths::%{_p}%} > 0:
  221. remove 1 from {setmutetimemonths::%{_p}%}
  222. setTempMuteTime({_p})
  223. punish({_p}, "mute_mute")
  224. format gui slot 34 of {_p} with lime concrete named "&c1 year" with lore "&7Remove 1 year to the mute time!" to close:
  225. if {setmutetimeyears::%{_p}%} > 0:
  226. remove 1 from {setmutetimeyears::%{_p}%}
  227. setTempMuteTime({_p})
  228. punish({_p}, "mute_mute")
  229. else if {_page} = "permmute_confirm":
  230. open virtual chest inventory with size 1 named "&3Punish GUI &8- &6Permanent Mute" to {_p}
  231. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the permanent mute." to close:
  232. console command "/advancedbans:mute %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
  233. broadcast ""
  234. broadcast "&3%{_p}% &bhas muted &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[FOREVER]"
  235. broadcast ""
  236. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the permanent mute." to run function punish({_p}, "mute_mute")
  237. else if {_page} = "mute_confirm":
  238. open virtual chest inventory with size 1 named "&3Punish GUI &8- &6Temporary Mute" to {_p}
  239. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the temporary mute." to close:
  240. console command "/advancedbans:tempmute %{punisher::%{_p}%}% %{setmutetime::%{_p}%}% -s %{reason::%{_p}%}%"
  241. broadcast ""
  242. broadcast "&3%{_p}% &bhas muted &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}% &b[%{setmutetime::%{_p}%}%]"
  243. broadcast ""
  244. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the temporary mute." to run function punish({_p}, "mute_mute")
  245. else if {_page} = "mute_unmute":
  246. open virtual chest inventory with size 1 named "&3Punish GUI &8- &6Unmute" to {_p}
  247. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the unmute." to close:
  248. console command "/advancedbans:unmute %{punisher::%{_p}%}%"
  249. broadcast ""
  250. broadcast "&3%{_p}% &bhas unmuted &3%{punisher::%{_p}%}%"
  251. broadcast ""
  252. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the unmute." to run function punish({_p}, "main_mute")
  253. else if {_page} = "main_kick":
  254. open virtual chest inventory with size 4 named "&3Punish GUI &8- &2Main Kick" to {_p}
  255. set {_a} to 27
  256. loop 9 times:
  257. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  258. add 1 to {_a}
  259. format gui slot 13 of {_p} with red concrete named "&cKick Player" to run function punish({_p}, "kick_kick")
  260. else if {_page} = "kick_kick":
  261. open virtual chest inventory with size 1 named "&3Punish GUI &8- &2Kick Confirm" to {_p}
  262. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the kick." to close:
  263. console command "/advancedbans:kick %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
  264. broadcast ""
  265. broadcast "&3%{_p}% &bhas kicked &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}%"
  266. broadcast ""
  267. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the kick." to run function punish({_p}, "main_kick")
  268. else if {_page} = "main_warn":
  269. open virtual chest inventory with size 4 named "&3Punish GUI &8- &aMain Warn" to {_p}
  270. set {_a} to 27
  271. loop 9 times:
  272. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  273. add 1 to {_a}
  274. format gui slot 31 of {_p} with book named "&3Punishment GUI &8- &aMain Warn" with lore "&7Return to the main page!" to run function punish({_p}, "main")
  275. format gui slot 12 of {_p} with lime concrete named "&aView Warns" with lore "&7View all the warns!" to run function punish({_p}, "warn_list")
  276. format gui slot 14 of {_p} with red concrete named "&cWarn Player" to run function punish({_p}, "warn_warn")
  277. else if {_page} = "warn_warn":
  278. open virtual chest inventory with size 1 named "&3Punish GUI &8- &aWarn Player" to {_p}
  279. format gui slot 1 of {_p} with lime concrete named "&aConfirm" with lore "&7Confirm the warn." to close:
  280. console command "/advancedbans:warn %{punisher::%{_p}%}% -s %{reason::%{_p}%}%"
  281. broadcast ""
  282. broadcast "&3%{_p}% &bhas warned &3%{punisher::%{_p}%}% &bdue to &3%{reason::%{_p}%}%"
  283. broadcast ""
  284. set {_a} to {punisher::%{_p}%}
  285. add "&3Warned by: &b%{_p}% || &3Reason: &b%{reason::%{_p}%}% || &3User: &b%{punisher::%{_p}%}%" to {warns::%{_a}%::*}
  286. format gui slot 8 of {_p} with red concrete named "&cDecline" with lore "&7Decline the warn." to run function punish({_p}, "main_warn")
  287. else if {_page} = "warn_list":
  288. open virtual chest inventory with size 6 named "&3Punishment GUI &8- &aWarn List" to {_p}
  289. set {_a} to 0
  290. loop 9 times:
  291. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  292. add 1 to {_a}
  293. set {_a} to 45
  294. loop 9 times:
  295. format gui slot {_a} of {_p} with gray stained glass pane named "&a"
  296. add 1 to {_a}
  297. set {_a} to {punisher::%{_p}%}
  298. format gui slot 4 of {_p} with paper named "&aWarns" with lore "&7Warns: %size of {warns::%{_a}%::*}%"
  299. format gui slot 49 of {_p} with book named "&3Punisment GUI &8- &aWarn List" with lore "&7Return to the main warn page!" to run function punish({_p}, "main_warn")
  300. loop {warns::%{_a}%::*}:
  301. set {_b} to "%{punisher::%{_p}%}%" parsed as offline player
  302. set {_c} to (loop-index - 1)
  303. format gui slot {_c} of {_p} with skull of {_b} named "&3Warn &8- &b%loop-index%" with lore "%{_b}%" to close:
  304. format gui slot {_c} of {_p} with air
  305. delete {warns::%{_a}%::%loop-index%}
  306. punish({_p}, "warn_list")
  307.  
  308. function setTempBanTime(p: Player):
  309. set {setbantime::%{_p}%} to "%{setbantimeyears::%{_p}%}%y %{setbantimemonths::%{_p}%}%mo %{setbantimeweeks::%{_p}%}%w %{setbantimedays::%{_p}%}%d %{setbantimehours::%{_p}%}%h %{setbantimeminutes::%{_p}%}%m %{setbantimeseconds::%{_p}%}%s"
  310.  
  311. function setTempMuteTime(p: Player):
  312. set {setmutetime::%{_p}%} to "%{setmutetimeyears::%{_p}%}%y %{setmutetimemonths::%{_p}%}%mo %{setmutetimeweeks::%{_p}%}%w %{setmutetimedays::%{_p}%}%d %{setmutetimehours::%{_p}%}%h %{setmutetimeminutes::%{_p}%}%m %{setmutetimeseconds::%{_p}%}%s"
  313.  
  314. #00 01 02 03 04 05 06 07 08
  315. #09 10 11 12 13 14 15 16 17
  316. #18 19 20 21 22 23 24 25 26
  317. #27 28 29 30 31 32 33 34 35
  318. #36 37 38 39 40 41 42 43 44
  319. #45 46 47 48 49 50 51 52 53
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement