Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on join:
- if {Muted.%player's uuid%} is true:
- set {_Muted.Log.%player's uuid%} to difference between {MutedLAST.%player's uuid%} and now
- remove {_Muted.Log.%player's uuid%} from {Muted.timespan.%player's uuid%}
- on script load:
- broadcast "&c/punish [<player>] [<reason>]"
- broadcast "&c/unpunish [<player>]"
- on join:
- if {Banned.%player's uuid%} is true:
- if {Banned.timespan.%player's uuid%} is 0 seconds:
- set {Banned.%player's uuid%} to false
- else if {Banned.timespan.%player's uuid%} is greater than 0 seconds:
- set {_Ban.Log.%player's uuid%} to difference between {BannedLAST.%player's uuid%} and now
- remove {_Ban.Log.%player's uuid%} from {Banned.timespan.%player's uuid%}
- send "&c&lPunishment! &cYou have been banned by &7%{Banned.issuer.%player's uuid%}%!"
- send "&cReason: &c&o%{Banned.reason.%player's uuid%}%"
- send "&cDuration: &c&o%{Banned.timespan.%player's uuid%}%"
- kick event-player
- on quit:
- if {Banned.%player's uuid%} is true:
- set {BannedLAST.%player's uuid%} to now
- if {Muted.%player's uuid%} is set:
- set {MutedLAST.%player's uuid%} to now
- on chat:
- if {Muted.%player's uuid%} is true:
- send "&c&lPunishment! &cYou have been muted by &7%{Muted.issuer.%player's uuid%}%!"
- send "&cReason: &c&o%{Muted.reason.%player's uuid%}%"
- send "&cDuration: &c&o%{Muted.timespan.%player's uuid%}%"
- cancel event
- every second:
- loop all players:
- if {Muted.%loop-player's uuid%} is true:
- remove 1 second from {Muted.timespan.%loop-player's uuid%}
- if {Muted.timespan.%loop-player's uuid%} is 0 seconds:
- set {Muted.%loop-player's uuid%} to false
- command /punish [<offline player>] [<text>]:
- permission: Rank.JrMod
- permission message: &c&lInsufficient Permission! &7You do not have permission too perform this action.
- trigger:
- if arg 2 is set:
- open virtual chest inventory with 5 rows named "Punish %arg-1%" to sender
- wait 1 tick
- format gui slot 4 of sender with skull of arg-1 named "&7Punish %arg-1%"
- format gui slot 11 of sender with green dye named "&2 Severity 1 mute" with lore "" and "&2First offense - 30 minute mute" and "&2Second offense - 1 hour" and "&2Third+ offense - 3 hour mute" to run function Mute1(arg-1, arg-2, sender)
- format gui slot 17 of sender with paper named "&c&lWarn" to run function Warn(arg-1, arg-2, sender)
- format gui slot 20 of sender with yellow dye named "&e Severity 2 mute" with lore "" and "&eFirst offense - 3 hours" and "&eSecond offense - 5 hours" and "&eThird+ offense - 1 day" to run function Mute2(arg-1, arg-2, sender)
- format gui slot 29 of sender with red dye named "&4 Severity 3 mute" with lore "" and "&4First offense - 1 day" and "&4Second offense - 2 days" and "&4Third+ offense - 3 days" to run function Mute3(arg-1, arg-2, sender)
- if sender has permission "Rank.Mod":
- format gui slot 15 of sender with green dye named "&2 Severity 1 ban" with lore "" and "&2First offense - 1 hour ban" and "&2Second offense - 2 hour ban" and "&2Third+ offense - 3 hour ban" to run function Ban1(arg-1, arg-2, sender)
- format gui slot 24 of sender with yellow dye named "&e Severity 2 ban" with lore "" and "&eFirst offense - 6 hours" and "&eSecond offense - 1 day" and "&eThird+ offense - 2 days" to run function Ban2(arg-1, arg-2, sender)
- format gui slot 33 of sender with red dye named "&4 Severity 3 ban" with lore "" and "&4First offense - 7 days" and "&4Second offense - 14 days" and "&4Third+ offense - Never..." to run function Ban3(arg-1, arg-2, sender)
- else:
- send "&c&lIncorrect Usage! &7/punish [<player>] [<reason>]" to sender
- command /unpunish [<offline player>]:
- permission: Rank.JrMod
- permission message: &c&lInsufficient Permission! &7You do not have permission to perform this action.
- trigger:
- open virtual chest inventory with 3 rows named "Unpunish %arg%" to sender
- format gui slot 11 of sender with redstone repeater named "&cUnmute %arg%" to run function Unmute(arg, sender)
- format gui slot 15 of sender with redstone repeater named "&cUnban %arg%" to run function Unban( arg, sender)
- function Unban(p: offline player, s: sender):
- set {_u} to uuid of {_p}
- if {Banned.%{_u}%} is true:
- set {Banned.%{_u}%} to false
- set {Banned.timespan.%{_u}%} to 0
- send "&c&lPunishment! &7Unbanned %{_p}%" to {_s}
- else:
- send "&c&lPunishment! &7That player is not banned!" to {_s}
- function Unmute(p: offline player, s: sender):
- set {_u} to uuid of {_p}
- if {Muted.%{_u}%} is true:
- set {Muted.%{_u}%} to false
- set {Muted.timespan.%{_u}%} to 0
- send "&c&lPunishment! &7Unmuted %{_p}%" to {_s}
- else:
- send "&c&lPunishment! &7That player is not muted!" to {_s}
- function Warn(p: offline player, r: text, s: sender):
- send "&c&lPunishment! &cYou have been warned by %{_s}%" to {_p}
- send "&cReason: &o&c%{_s}%" to {_p}
- send "&c&lPunishment! &cA staff member &7has warned &c%{_p}% &7for &c%{_r}%" to all players where [input has permission "Rank.Mod"]
- play sound "ENTITY_VILLAGER_NO" with volume 100 to {_p}
- function Mute1(p: offline player, r: text, s: sender):
- set {_u} to uuid of {_p}
- if {Mute.Sev1.%{_u}%} is 1:
- Mute({_p}, {_r}, 30 minutes, {_s})
- add 1 to {Mute.Sev1.%{_u}%}
- broadcast "%{_u}%"
- else if {Mute.Sev1.%{_u}%} is 2:
- Mute({_p}, {_r}, 1 hour, {_s})
- add 1 to {Mute.Sev1.%{_u}%}
- broadcast "%{_u}%"
- else if {Mute.Sev1.%{_u}%} <= 3:
- Mute({_p}, {_r}, 3 hours, {_s})
- broadcast "%{_u}%"
- function Mute2(p: offline player, r: text, s: sender):
- set {_u} to uuid of {_p}
- if {Mute.Sev2.%{_u}%} is 1:
- Mute({_p}, {_r}, 3 hours, {_s})
- add 1 to {Mute.Sev2.%{_u}%}
- else if {Mute.Sev2.%{_u}%} is 2:
- Mute({_p}, {_r}, 5 hours, {_s})
- add 1 to {Mute.Sev2.%{_u}%}
- else if {Mute.Sev2.%{_u}%} <= 3:
- Mute({_p}, {_r}, 1 day, {_s})
- function Mute3(p: offline player, r: text, s: sender):
- set {_u} to uuid of {_p}
- if {Mute.Sev3.%{_u}%} != 3 days:
- add 1 day to {Mute.Sev3.%{_u}%}
- Mute({_p}, {_r}, {Mute.Sev3.%{_u}%}, {_s})
- else:
- Mute({_p}, {_r}, 3 days, {_s})
- function Ban1(p: offline player, r: text, s: sender):
- set {_u} to uuid of {_p}
- if {Ban.Sev1.%{_u}%} != 3 hours:
- add 1 hour to {Ban.Sev1.%{_u}%}
- Ban({_p}, {_r}, {Ban.Sev1.%{_u}%}, {_s})
- else:
- Ban({_p}, {_r}, 3 hours, {_s})
- function Ban2(p: offline player, r: text, s: sender):
- set {_u} to uuid of {_p}
- if {Ban.Sev2.%{_u}%} is 1:
- Ban({_p}, {_r}, 6 hours, {_s})
- add 1 to {Ban.Sev2.%{_u}%}
- else if {Ban.Sev2.%{_u}%} is 2:
- Ban({_p}, {_r}, 2 days, {_s})
- add 1 to {Mute.Sev2.%{_u}%}
- else if {Ban.Sev2.%{_u}%} <= 3:
- Ban({_p}, {_r}, 2 days, {_s})
- function Ban3(p: offline player, r: text, s: sender):
- set {_u} to uuid of {_p}
- if {Ban.Sev3.%{_u}%} != 14 days:
- add 7 days to {Ban.Sev3.%{_u}%}
- Ban({_p}, {_r}, {Ban.Sev3.%{_u}%}, {_s})
- else:
- Ban({_p}, {_r}, 999 days, {_s})
- function Mute(p: offline player, r: text, d: timespan, s: sender):
- set {_u} to uuid of {_p}
- close {_s}'s inventory
- set {Muted.%{_u}%} to true
- set {Muted.timespan.%{_u}%} to {_d}
- set {Muted.issuer.%{_u}%} to {_s}
- set {Muted.reason.%{_u}%} to {_r}
- send "&c&lPunishment! &cYou have been muted by &7%{_s}%!" to {_p}
- send "&cReason: &c&o%{_r}%" to {_p}
- send "&cDuration: &c&o%{_d}%" to {_p}
- broadcast "&c&lPunishment! &cA staff member &7has muted &c%{_p}% &7for &c%{_r}% &7&o%{_d}%"
- function Ban(p: offline player, r: text, d: timespan, s: sender):
- set {_u} to uuid of {_p}
- close {_s}'s inventory
- set {Banned.%{_u}%} to true
- set {Banned.reason.%{_u}%} to {_r}
- set {Banned.timespan.%{_u}%} to {_d}
- set {Banned.issuer.%{_u}%} to {_s}
- send "&c&lPunishment! &cYou have been banned by &7%{_s}%!" to {_p}
- send "&cReason: %{_r}%" to {_p}
- send "&cDuration: %{_d}%" to {_p}
- kick {_p}
- broadcast "&c&lPunishment! &cA staff member &7has banned &c%{_p}% &7for &c%{_r}% &7&o%{_d}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement