Files
staff_system.sk
Code
1 171
staff_system.sk
# DonutSMP Staff System
# Place this file in plugins/Skript/scripts/
# Reload with: /sk reload staff_system
options:
prefix: &8[&6Staff&8]&r
sus-gui-name: &8SUS Players
command /sus [<player>]:
permission: donutsmp.staff.sus
permission message: &cYou do not have permission to use this command.
executable by: players
trigger:
if arg-1 is set:
if {staff.sus::%uuid of arg-1%} is set:
delete {staff.sus::%uuid of arg-1%}
send "{@prefix} &a%arg-1% is no longer marked as SUS."
else:
set {staff.sus::%uuid of arg-1%} to name of arg-1
send "{@prefix} &c%arg-1% has been marked as SUS."
stop
delete {staff.sus.gui::%uuid of player%::*}
open chest with 6 rows named "{@sus-gui-name}" to player
set {_slot} to 0
loop {staff.sus::*}:
if {_slot} >= 54:
stop loop
set slot {_slot} of player's current inventory to player head named "&c%loop-value%" with lore "&7Click to remove this player from the SUS list."
set {staff.sus.gui::%uuid of player%::%{_slot}%} to loop-index
add 1 to {_slot}
if {_slot} is 0:
set slot 22 of player's current inventory to barrier named "&cNo SUS players" with lore "&7Use &f/sus <player> &7to add someone."
on inventory click:
if name of event-inventory is "{@sus-gui-name}":
cancel event
set {_susUuid} to {staff.sus.gui::%uuid of player%::%event-slot%}
if {_susUuid} is set:
set {_susName} to {staff.sus::%{_susUuid}%}
delete {staff.sus::%{_susUuid}%}
delete {staff.sus.gui::%uuid of player%::%event-slot%}
close player's inventory
send "{@prefix} &a%{_susName}% has been removed from the SUS list."
stop
if {staff.frozen::%uuid of player%} is set:
cancel event
on inventory drag:
if name of event-inventory is "{@sus-gui-name}":
cancel event
if {staff.frozen::%uuid of player%} is set:
cancel event
command /staffmode:
permission: donutsmp.staff.staffmode
permission message: &cYou do not have permission to use this command.
executable by: players
trigger:
if {staff.mode::%uuid of player%} is set:
delete {staff.mode::%uuid of player%}
remove invisibility from player
remove speed from player
set player's flight mode to false
send "{@prefix} &cStaff mode disabled."
else:
set {staff.mode::%uuid of player%} to true
apply invisibility to player for 999 days
apply speed 2 to player for 999 days
set player's flight mode to true
send "{@prefix} &aStaff mode enabled."
on join:
if {staff.mode::%uuid of player%} is set:
wait 1 tick
apply invisibility to player for 999 days
apply speed 2 to player for 999 days
set player's flight mode to true
on damage:
if victim is a player:
if {staff.mode::%uuid of victim%} is set:
cancel event
if {staff.frozen::%uuid of victim%} is set:
cancel event
on player move:
if {staff.frozen::%uuid of player%} is set:
cancel event
on block break:
if {staff.frozen::%uuid of player%} is set:
cancel event
on block place:
if {staff.frozen::%uuid of player%} is set:
cancel event
command /freeze <player>:
permission: donutsmp.staff.freeze
permission message: &cYou do not have permission to use this command.
executable by: players
trigger:
if arg-1 is player:
send "{@prefix} &cYou cannot freeze yourself."
stop
if {staff.frozen::%uuid of arg-1%} is set:
delete {staff.frozen::%uuid of arg-1%}
send "{@prefix} &a%arg-1% has been unfrozen."
send "{@prefix} &aYou have been unfrozen." to arg-1
else:
set {staff.frozen::%uuid of arg-1%} to true
send "{@prefix} &c%arg-1% has been frozen."
send "{@prefix} &cYou have been frozen by a staff member." to arg-1
command /spawnstash [<text>]:
permission: donutsmp.staff.spawnstash
permission message: &cYou do not have permission to use this command.
executable by: players
trigger:
if arg-1 is "set":
set {staff.spawnstash} to location of player
send "{@prefix} &aSpawn stash location has been set."
stop
if {staff.spawnstash} is not set:
send "{@prefix} &cNo spawn stash location has been set."
send "{@prefix} &7Use &f/spawnstash set &7to set one."
stop
teleport player to {staff.spawnstash}
send "{@prefix} &aTeleported to the spawn stash."
command /fakeplayer [<text>]:
permission: donutsmp.staff.fakeplayer
permission message: &cYou do not have permission to use this command.
executable by: players
trigger:
if arg-1 is "remove":
loop {staff.fakeplayers::*}:
kill loop-value
delete {staff.fakeplayers::*}
send "{@prefix} &aAll fake players have been removed."
stop
set {_fakeName} to "Fake Player"
if arg-1 is set:
set {_fakeName} to arg-1
spawn an armor stand at location of player
set gravity of last spawned entity to false
set arms of last spawned entity to true
set custom name of last spawned entity to "&e%{_fakeName}%"
set custom name visibility of last spawned entity to true
set helmet of last spawned entity to player head
add last spawned entity to {staff.fakeplayers::*}
send "{@prefix} &aFake player spawned."
send "{@prefix} &7Use &f/fakeplayer remove &7to remove all fake players."
on right click on armor stand:
if clicked entity is in {staff.fakeplayers::*}:
cancel event
on damage of armor stand:
if victim is in {staff.fakeplayers::*}:
cancel event