i've been making a gui ban skript or my server for a few hours and i can't get it to run commands anymore
it worked fine before but it just stopped working for some reason
i am using skript 1.14
thanks for any help
here is the skript
it worked fine before but it just stopped working for some reason
i am using skript 1.14
thanks for any help
here is the skript
Code:
command /punish <offline player>:
permission: sc.punish
trigger:
if {PunishPlayer::%player%} has the permission "sc.punish.exempt":
message "&cYou Can Not Punish This Player"
else:
message "punish command ran"
create new gui with virtual chest with 1 row named "&a&lPunishments":
make gui slot 0 with diamond named "&cX-Ray" with lore "":
XrayPunish(player)
make gui slot 1 with feather named "&cFly Hacks" with lore "":
FlyPunish(player)
open last gui to player
command /resetoffence <offline player>:
trigger:
if player has the permission "sc.admin":
delete {PunishOffences::%arg%}
message "Reset Offences Of %arg%"
else:
message "&cYou Do Not Have This Permission"
function XrayPunish(p: player):
message "%{_p}%" to {_p}
create new gui with virtual chest with 1 row named "&a&lX-Ray Hacks":
make gui slot 0 with barrier named "&61st Offence" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
set {PunishTime} to 10 days later
execute console command "/tempban %{PunishPlayer::%{_p}%}% 10d X-Ray Hacks (1st Offence) You Will Be Unbanned On %{PunishTime}%"
delete {PunishTime}
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
close player's inventory
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
make gui slot 1 with barrier named "&62nd Offence" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
set {PunishTime} to 15 days later
execute console command "/tempban %{PunishPlayer::%{_p}%}% 15d X-Ray Hacks (2nd Offence) You Will Be Unbanned On %{PunishTime}%"
delete {PunishTime}
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
close player's inventory
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
make gui slot 2 with barrier named "&63rd Offence" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
set {PunishTime} to 30 days later
execute console command "/tempban %{PunishPlayer::%{_p}%}% 30d X-Ray Hacks (3rd Offence) You Will Be Unbanned On %{PunishTime}%"
delete {PunishTime}
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
close player's inventory
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
make gui slot 4 with fire charge named "&6Perm" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
execute console command "/ban %{PunishPlayer::%{_p}%}% X-Ray Hacks (Perm)"
close player's inventory
delete {PunishOffences::%{PunishPlayer::%{_p}%}%}
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
if {PunishOffences::%{PunishPlayer::%{_p}%}%} is not set:
make gui slot 8 with paper named "&6This Player Has 0 Offences" with lore ""
else:
make gui slot 8 with paper named "&6This Player Has %{PunishOffences::%{PunishPlayer::%{_p}%}%}% Offences" with lore ""
open last gui to {_p}
function FlyPunish(p: player):
message "hi" to {_p}
create new gui with virtual chest with 1 row named "&a&lFly Hacks":
make gui slot 0 with barrier named "&61st Offence" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
set {PunishTime} to 10 days later
execute console command "/tempban %{PunishPlayer::%{_p}%}% 10d Fly Hacks (1st Offence) You Will Be Unbanned On %{PunishTime}%"
delete {PunishTime}
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
close player's inventory
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
make gui slot 1 with barrier named "&62nd Offence" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
set {PunishTime} to 15 days later
execute console command "/tempban %{PunishPlayer::%{_p}%}% 15d Fly Hacks (2nd Offence) You Will Be Unbanned On %{PunishTime}%"
delete {PunishTime}
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
close player's inventory
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
make gui slot 2 with barrier named "&63rd Offence" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
set {PunishTime} to 30 days later
execute console command "/tempban %{PunishPlayer::%{_p}%}% 30d Fly Hacks (3rd Offence) You Will Be Unbanned On %{PunishTime}%"
delete {PunishTime}
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
close player's inventory
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
make gui slot 4 with fire charge named "&6Perm" with lore "":
add 1 to {PunishOffences::%{PunishPlayer::%{_p}%}%}
execute console command "/ban %{PunishPlayer::%{_p}%}% Fly Hacks (Perm)"
close player's inventory
delete {PunishOffences::%{PunishPlayer::%{_p}%}%}
delete {PunishBroadcast::%{_p}%}
delete {PunishPlayer::%{_p}%}
if {PunishOffences::%{PunishPlayer::%{_p}%}%} is not set:
make gui slot 8 with paper named "&6This Player Has 0 Offences" with lore ""
else:
make gui slot 8 with paper named "&6This Player Has %{PunishOffences::%{PunishPlayer::%{_p}%}%}% Offences" with lore ""
open last gui to {_p}