Bans Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Swirly

Member
Aug 5, 2018
16
0
1
24
Admins can delete this fourm
 

Attachments

  • Ban 1.PNG
    Ban 1.PNG
    81.3 KB · Views: 376
  • Ban 2.PNG
    Ban 2.PNG
    10.3 KB · Views: 373
Last edited:
View attachment 3562 View attachment 3563
prefix: &7&l[&c&lBans&7&l]


#-------------[DO NOT CHANGE ANYTHING BELOW THIS LINE]-------------

ban_permission: Bans.ban

banip_permission: Bans.ip

tempban_permission: Bans.tempban

kick_permission: Bans.kick

unban_permission: Bans.unban

baninfo_permission: Bans.info

notify_permission: Bans.notify


command /ban [<Offlineplayer>] [<Text>]:
trigger:
if player has permission "{@ban_permission}":
if arg 1 is set:
if arg 2 is set:
set {banned.%arg 1%} to true
set {ban.time.%arg 1%} to now
set {ban.reason.%arg 1%} to argument-2
set {ban.expire.%arg 1%} to "Never"
set {ban.bannedby.%arg 1%} to player
set {BanIP.%arg 1%} to "False"
kick arg 1 due to "&7Banned for &c%arg 2% &7by &c%player%"
ban arg 1 due to "&7Banned for &c%arg 2% &7by &c%player%"
loop all players:
loop-player has permission "{@notify_permission}"
send "{@prefix} &c%player% &7banned &c%arg 1% &7Reason: &c%arg 2%" to loop-player
else:
send "{@prefix} &c/Ban <Player> <Reason>"
else:
send "{@prefix} &c/Ban <Player> <Reason>"
else:
send "{@prefix} &cNo permission"

command /banip [<Offlineplayer>] [<Text>]:
trigger:
if player has permission "{@banip_permission}":
if arg 1 is set:
if arg 2 is set:
set {banned.%arg 1%} to true
set {ban.time.%arg 1%} to now
set {ban.reason.%arg 1%} to argument-2
set {ban.expire.%arg 1%} to "Never"
set {ban.bannedby.%arg 1%} to player
set {IP.%arg 1%} to ip of arg 1
set {BanIP.%arg 1%} to "True"
kick arg 1 due to "&7IP-Banned for &c%arg 2% &7by &c%player%"
ban arg 1 due to "&7IP-Banned for &c%arg 2% &7by &c%player%"
ban ip of arg 1 due to "&7IP-Banned for &c%arg 2% &7by &c%player%"
loop all players:
loop-player has permission "{@notify_permission}"
send "{@prefix} &c%player% &7ip-banned &c%arg 1% &7Reason: &c%arg 2%" to loop-player
else:
send "{@prefix} &c/Banip <Player> <Reason>"
else:
send "{@prefix} &c/Banip <Player> <Reason>"
else:
send "{@prefix} &cNo permission"

command /unban [<offlineplayer>]:
trigger:
if player has permission "@unban_permission":
if arg 1 is set:
if {banned.%arg 1%} is true:
unban arg-1
unban ip of arg 1
set {banned.%arg 1%} to false
loop all players:
loop-player has permission "{@notify_permission}"
send "{@prefix} &c%player% &7unbanned &c%arg 1%" to loop-player
else:
send "{@prefix} &cThis player isn't banned"
else:
send "{@prefix} &c/Unban <Player>"
else:
send "{@prefix} &cNo permission"

command /kick [<Offlineplayer>] [<Text>]:
trigger:
if player has permission "{@kick_permission}":
if arg 1 is set:
if arg 2 is set:
kick arg 1 due to "&7Kicked for &c%arg 2% &7by &c%player%"
loop all players:
loop-player has permission "{@notify_permission}"
send "{@prefix} &c%player% &7kicked &c%arg 1% &7Reason: &c%arg 2%" to loop-player
else:
send "{@prefix} &c/kick <Player> <Reason>"
else:
send "{@prefix} &c/kick <Player> <Reason>"
else:
send "{@prefix} &cNo permission"

command /baninfo [<offlineplayer>]:
trigger:
if player has permission "{@baninfo_permission}":
if arg is set:
if {banned.%arg 1%} is true:
send "&7&m------------------------"
send "&c&lBanned player&7: %arg 1%"
send "&c&lBanned by&7: %{ban.bannedby.%arg 1%}%"
send "&c&lBan reason&7: %{ban.reason.%arg 1%}%"
send "&c&lTime of Ban (EST) &7: %{ban.time.%arg 1%}%"
send "&c&lIP Banned &7: %{BanIP.%arg 1%}%"
send "&c&lExpiration&7: %{ban.expire.%arg 1%}%"
send "&7&m------------------------"
else:
send "{@prefix} &cThis player is not banned"
else:
send "{@prefix} &c/Baninfo <Player>"
else:
send "{@prefix} &cNo Permission"


ban_permission: Bans.ban

banip_permission: Bans.ip

tempban_permission: Bans.tempban

kick_permission: Bans.kick

unban_permission: Bans.unban

baninfo_permission: Bans.info

notify_permission: Bans.notify


Kick Players
Ban Players
IP-Ban Players
Unban Players
Check Ban info

This isn't the place to showcase your script. This subforum is for Skript help. If you want to post your script, make a resource.
 
Status
Not open for further replies.