SHARE
TWEET

mute skript

a guest Jan 21st, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command /mute [<offlineplayer>] [<text>]:
  2.   permission: staff
  3.   permission message: &8» &7You don't have enough permission!
  4.   trigger:
  5.     if arg-1 is set:
  6.       if arg-2 is set:
  7.         if {mute.%arg-1's uuid%} is not set:
  8.           set {mute.%arg-1's uuid%} to "1"
  9.           broadcast "%nl%&3%player% &7muted &c%arg-1% &7for &a%arg-2%%nl%&7"
  10.           stop
  11.         if {mute.%arg-1's uuid%} is set:
  12.           delete {mute.%arg-1's uuid%}
  13.           broadcast "%nl%&3%player% &7unmuted &c%arg-1%%nl%&7"
  14.           stop
  15.       else:
  16.         send "&8» &7/mute (player) (reason)"
  17.     else:
  18.       send "&8» &7/mute (player) (reason)"
  19.  
  20. on chat:
  21.   if {mute.%player's uuid%} is set:
  22.     cancel event
  23.     send "&7Sorry, you are muted and unable to talk in chat."
  24.     stop
  25.  
  26. variables:
  27.   {hourmutetime} = 0
  28.   {daymutetime} = 0
  29.   {weekmutetime} = 0
  30.  
  31. command /Tempmute [<offlineplayer>] [<integer>] [<text>] [<text>]:
  32.   permission: staff
  33.   permission message: &8» &7You don't have enough permission!
  34.   trigger:
  35.     if arg-1 is set:
  36.       if arg-2 is set:
  37.         if arg-4 is set:
  38.           if arg-3 is set:
  39.             if arg-3 is "h" or "hour":
  40.               delete {hourtempmute.%arg-1's uuid%}
  41.               delete {daytempmute.%arg-1's uuid%}
  42.               delete {weektempmute.%arg-1's uuid%}
  43.               delete {mute.%arg-1's uuid%}
  44.               if {Tempmute::*} contains arg-1:
  45.                 remove arg-1 from {Tempmute::*}
  46.               set {mute.%arg-1's uuid%} to "true"
  47.               set {hourtempmute.%arg-1's uuid%} to {hourmutetime}+arg-2
  48.               broadcast "%nl%&c%arg-1% &7was muted by &3%player% &7for &a%arg-4% &c[%arg-2% Hour(s)]%nl%&7"
  49.               add arg-1 to {Tempmute::*}
  50.             if arg-3 is "d" or "day":
  51.               delete {hourtempmute.%arg-1's uuid%}
  52.               delete {daytempmute.%arg-1's uuid%}
  53.               delete {weektempmute.%arg-1's uuid%}
  54.               delete {mute.%arg-1's uuid%}
  55.               if {Tempmute::*} contains arg-1:
  56.                 remove arg-1 from {Tempmute::*}
  57.               broadcast "%nl%&c%arg-1% &7was muted by &3%player% &7for &a%arg-4% &c[%arg-2% Day(s)]%nl%&7"
  58.               set {mute.%arg-1's uuid%} to "true"
  59.               set {_time} to arg-2*24
  60.               set {daytempmute.%arg-1's uuid%} to {daymutetime}+{_time}
  61.               add arg-1 to {Tempmute::*}
  62.             if arg-3 is "w" or "week":
  63.               delete {hourtempmute.%arg-1's uuid%}
  64.               delete {daytempmute.%arg-1's uuid%}
  65.               delete {weektempmute.%arg-1's uuid%}
  66.               delete {mute.%arg-1's uuid%}
  67.               if {Tempmute::*} contains arg-1:
  68.                 remove arg-1 from {Tempmute::*}
  69.               broadcast "%nl%&c%arg-1% &7was muted by &3%player% &7for &a%arg-4% &c[%arg-2% Week(s)]%nl%&7"
  70.               set {mute.%arg-1's uuid%} to "true"
  71.               set {_time} to arg-2*168
  72.               set {weektempmute.%arg-1's uuid%} to {weekmutetime}+{_time}
  73.               add arg-1 to {Tempmute::*}
  74.             if arg-3 is not "d" or "day" or "h" or "hour" or "w" or "week":
  75.               send "&8» &7/tempmute (player) (timespam) (h[our]|d[ay]|w[eek]) (reason)"
  76.     if arg-1 is not set:
  77.       send "&8» &7/tempmute (player) (timespam) (h[our]|d[ay]|w[eek]) (reason)"
  78.       stop
  79.     if arg-2 is not set:
  80.       send "&8» &7/tempmute (player) (timespam) (h[our]|d[ay]|w[eek]) (reason)"
  81.       stop
  82.     if arg-3 is not set:
  83.       send "&8» &7/tempmute (player) (timespam) (h[our]|d[ay]|w[eek]) (reason)"
  84.       stop
  85.     if arg-4 is not set:
  86.       send "&8» &7/tempmute (player) (timespam) (h[our]|d[ay]|w[eek]) (reason)"
  87.       stop
  88.  
  89.                
  90. every hour:
  91.     add 1 to {hourmutetime}
  92.     add 1 to {daymutetime}
  93.     add 1 to {weekmutetime}
  94.     loop {tempmute::*}:
  95.         if {hourtempmute.%loop-value's uuid%} is set:
  96.             if {hourtempmute.%loop-value's uuid%} > {hourmutetime}-1:
  97.                 delete {mute.%loop-value's uuid%}
  98.                 remove loop-value from {tempmute::*}
  99.         if {daytempmute.%loop-value's uuid%} is set:
  100.             if {hourtempmute.%loop-value's uuid%} > {daymutetime}-1:
  101.                 delete {mute.%loop-value's uuid%}
  102.                 remove loop-value from {tempmute::*}
  103.         if {weektempmute.%loop-value's uuid%} is set:
  104.             if {hourtempmute.%loop-value's uuid%} > {weekmutetime}-1:
  105.                 delete {mute.%loop-value's uuid%}
  106.                 remove loop-value from {tempmute::*}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top