Zeldaboy111

Skript Tutorial #17 Ban skript af!

Oct 4th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. #Als je de coding in je video gebruikt, zet dan het volgende in je beschrijving (kopieer en plak):
  2. # Gemaakt door: Zeldaboy111/Tom Pampiermole
  3. # YouTube kanaal van de maker: https://www.youtube.com/channel/UClmeX0PpxrQd9q-4kRaBefg?view_as=subscriber
  4.  
  5. options:
  6. {max::bantime::%uuid of arg 1%} = {max::bantime::%uuid of loop-value%}
  7. {time::ban::%uuid of arg 1%} = {time::ban::%uuid of loop-value%}
  8. {ban::%uuid of arg 1%} = {ban::%uuid of player%}
  9. {playerb::ban::%uuid of arg 1%} = {playerb::ban::%uuid of loop-value%}
  10.  
  11. on connect:
  12. loop {x-raytempbanned::*}:
  13. set {ban::%uuid of loop-value%} to true
  14. if {ban::%uuid of loop-value%} is true:
  15. set {ban::unbandatekick::%uuid of player%} to {max::bantime::%uuid of loop-value%}-{time::ban::%uuid of loop-value%}
  16.  
  17. kick player due to "&4Je bent gebanned!%nl%&4Rede: &c%{ban::reason::%uuid of player%}%%nl%&4Bandatum: &c%{ban::date::%uuid of player%}%%nl%&4Unban over: &c%{ban::unbandatekick::%uuid of player%}% &4dagen"
  18.  
  19. every 1 second:
  20. loop {x-raytempbanned::*}:
  21. set {max::bantime::%uuid of loop-value%} to 3
  22. if {time::ban::%uuid of loop-value%} is more than {max::bantime::%uuid of loop-value%}-1:
  23.  
  24. execute console command "punban %loop-value%"
  25. delete {ban::%uuid of loop-value%}
  26. delete {time::ban::%uuid of loop-value%}
  27. delete {max::bantime::%uuid of loop-value%}
  28. remove "%uuid of loop-value%" from {x-raytempbanned::*}
  29. stop
  30.  
  31.  
  32. else:
  33.  
  34. #send "%{max::bantime::%uuid of loop-value%}% + %{time::ban::%uuid of loop-value%}%" to console
  35. set {max::bantime::%uuid of loop-value%} to 3
  36. add 1 to {time::ban::%uuid of loop-value%}
  37. stop
  38.  
  39. command /punishment [<offline player>]:
  40. aliases: /pu
  41. trigger:
  42. if player has permission "punishment":
  43. if arg 1 is set:
  44. open chest with 2 rows named "&4-=-=-&cBan &c%arg 1%&4-=-=-" to player
  45.  
  46. format slot 0 of player with diamond named "&3X-Ray Hacks" with lore "&7Ban voor: 3 dagen" to close then run [execute console command "/cpunishment %arg 1% X-Ray 3 %player%"]
  47. stop
  48. else:
  49. send "&c<Punishment> &4Doe &c/punishment [speler] &4om deze command uit te voeren."
  50. stop
  51. else:
  52. send "&c<Punishment> &4Je hebt onvoldoende rechten om deze command uit te voeren."
  53. stop
  54.  
  55. #===================================================
  56.  
  57. command /cpunishment [<offline player>] [<text>] [<number>] [<offline player>]:
  58. executable by: console
  59. trigger:
  60. if arg 1 is set:
  61. if arg 2 is set:
  62. #set {tempban.%arg 1%} to {banntime.%arg 1%}+arg 3
  63. #add arg 1 to {tempbanned::*}
  64. set {playerb::ban::%uuid of arg 1%} to "%arg 1%"
  65. set {ban::world::%uuid of arg 1%} to world of arg 1
  66.  
  67. set {ban::reason::%uuid of arg 1%} to arg 2
  68. set {ban::date::%uuid of arg 1%} to now
  69. set {ban::unbandate::%uuid of arg 1%} to arg 3
  70.  
  71. set {time::ban::%uuid of arg 1%} to 0
  72. set {max::bantime::%uuid of arg 1%} to arg 3
  73.  
  74. set {ban::%uuid of arg 1%} to true
  75. add "%uuid of arg 1%" to {x-raytempbanned::*}
  76.  
  77. send "&2De speler: &a%{ban::player::%uuid of arg 1%}% &2is succesvol gebanned:" to arg 4
  78. send "&2Speler: &a%{ban::player::%uuid of arg 1%}%" to arg 4
  79. send "&2Datum: &a%{ban::date::%uuid of arg 1%}%" to arg 4
  80. send "&2Rede: &a%{ban::reason::%uuid of arg 1%}%" to arg 4
  81.  
  82.  
  83.  
  84.  
  85. loop all players in world "%{ban::world::%uuid of arg 1%}%":
  86. send "&4<&cBanned&4> De speler: &c%{ban::player::%uuid of arg 1%}% &4is gebanned met de rede: &c%{ban::reason::%uuid of arg 1%}%" to loop-player
  87.  
  88. kick arg 1 due to "&4Je bent gebanned!%nl%&4Rede: &c%{ban::reason::%uuid of arg 1%}%%nl%&4Bandatum: &c%{ban::date::%uuid of arg 1%}%%nl%&4Unban over: &c%{ban::unbandate::%uuid of arg 1%}% &4dagen"
  89.  
  90. strike lightning at arg 1
  91. wait 5 ticks
  92. strike lightning at arg 1
  93. wait 5 ticks
  94. launch star firework colored blue and white at arg 1 timed 0.2
  95. wait 1 ticks
  96. launch star firework colored red and white at arg 1 timed 0.2
  97. wait 1 ticks
  98. launch star firework colored green and white at arg 1 timed 0.2
  99. stop
  100.  
  101. else:
  102. send "&c<CPunishment> &4Kan persoon niet bannen omdat: de &creden &4niet opgegeven is." to console
  103. stop
  104. else:
  105. send "&c<CPunishment> &4Kan persoon niet bannen omdat: de &cnaam &4niet opgegeven is en de &creden &4is niet opgegeven." to console
  106. stop
  107.  
  108. command /punban <offline player>:
  109. executable by: console
  110. trigger:
  111. if {time::ban::%uuid of arg 1%} is more than {max::bantime::%uuid of arg 1%}-1:
  112. delete {ban::%uuid of arg 1%}
  113. delete {time::ban::%uuid of arg 1%}
  114. delete {max::bantime::%uuid of arg 1%}
  115. remove "%uuid of arg 1%" from {x-raytempbanned::*}
  116. stop
  117.  
  118. command /punban2 <offline player>:
  119. executable by: console
  120. trigger:
  121. delete {ban::%uuid of arg 1%}
  122. delete {time::ban::%uuid of arg 1%}
  123. delete {max::bantime::%uuid of arg 1%}
  124. remove "%uuid of arg 1%" from {x-raytempbanned::*}
  125. remove arg 1 from {x-raytempbanned::*}
  126. send "&aUnbanned %arg 1%" to console
  127. stop
  128.  
  129. command /pm:
  130. trigger:
  131. execute player command "/sk reload punishment"
Add Comment
Please, Sign In to add comment