Tempban player without the normal skript way.

  • 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 community!

    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.

SamSkripter1

Member
Jul 17, 2021
1
0
1
So, i want to temp ban players using a GUI for my admins, but cant find a way to tempban without using "ban player for 3 days" because that includes You are banned from the server reason: i dont want that so im using on join and variables. How would i tempban with this?
Code:

Code:
command /stafftools:
   aliases: /st, /staff, /tools
   permission: lukacraft.staff
   trigger:
       give player a diamond axe named "&cStaff &aTools"
on damage:
   if attacker has permission "lukacraft.staff":
       if attacker is holding a diamond axe named "&cStaff &aTools":
           cancel event
           set {playe1r} to victim

           set metadata tag "vanillaGUI" of attacker to chest inventory with 3 rows named "&cStaff &aTools"
           set slot 0 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 1 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 2 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 9 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 18 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 19 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 20 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 11 of metadata tag "vanillaGUI" of attacker to blue glass pane named "&r"
           set slot 10 of metadata tag "vanillaGUI" of attacker to barrier named "&cBan &a%victim%"

           open (metadata tag "vanillaGUI" of attacker) to attacker
on inventory click:
   if event-inventory = (metadata tag "vanillaGUI" of player):
       #check if the clicked inventory is the one we just created
       cancel event
       #cancel the clicking. This makes the Item unstealable
       if index of event-slot is 10:
           set metadata tag "Ban2" of player to chest inventory with 3 rows named "&cStaff &aTools"
           set slot 0 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 1 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 2 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 9 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 18 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 19 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 20 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 11 of metadata tag "Ban2" of player to blue glass pane named "&r"
           set slot 10 of metadata tag "Ban2" of player to feather named "&cBan %{playe1r}% &8(&cHacks&a/&fFly&8)"
           open (metadata tag "Ban2" of player) to player
   
on inventory click:
   if event-inventory = (metadata tag "Ban2" of player):
       cancel event
       if index of event-slot is 10:
           set {ban::%{playe1r}%} to true
           kick {playe1r} due to "&5&lVibe&b&lCraft &r&cAdmins. %newline% &r %newline% &aJe bent geband voor &cHacks &a/ &rVliegen! %newline% &r %newline% &4Je ban is weg binnen 30 dagen. %newline% &r %newline% &nDenk je dat je gefalse banned bent?&r %newline% &r %newline% &bMaak dan een ticket in de discord!"
           set {banr::%{playe1r}%} to "&5&lVibe&b&lCraft &r&cAdmins. %newline% &r %newline% &aJe bent geband voor &cHacks &a/ &rVliegen! %newline% &r %newline% &4Je ban is weg binnen 30 dagen. %newline% &r %newline% &nDenk je dat je gefalse banned bent?&r %newline% &r %newline% &bMaak dan een ticket in de discord!"
           send "&cJe hebt &b%{playe1r}%&c geband voor: &cHacks&a / &fVliegen." to player
on join:
   if {ban::%player%} is true:
       kick {playe1r} due to "%{banr::%player%}%"
command /unban <offline player>:
   trigger:
       set {ban::%arg-1%} to false
on join:
   if {ban::%player%} is true:
       set join message to ""
       stop
   else:
       set join message to "&e%player% joined the server."
on quit:
   if {ban::%player%} is true:
       set quit message to ""
       stop
   else:
       set quit message to "&e%player% left the server."[CODE/]
 
Status
Not open for further replies.