Sueta
FA

FakeLog

1.0

An easier way to spy on others with only doing 1 command.

·Plugin

FakeLog
made by Chastros

Description:
FakeLog is a simple skript that allows the simplicity of using just items to instantly toggle yourself "offline" or "online". It is a player based command, so console will not be able to use it. It makes life easier when spying on those pesky hackers and/or suspicious staff.

Permissions

Permissions:
FakeLog.use - Allows the user to use the command and access the different toggles

Command

Command:
/fakelog, /fakel, /flog, /fl - Gives the player the FakeLog item

Surprise, only 1 command with several aliases.

Code

Code:

#========================================================#
#
#                      FakeLog
#
#========================================================#
#            by Chastros | Discord: Chastros#1422
#========================================================#
#
#       Please PM me on Discord if you need/want help!
#
#========================================================#


#========================================================#
#
#                        Variables
#
#========================================================#

options:
    fakelog: §e[§6§lFakeLog§e]
 
    item: barrier
    item-ggp: green glass pane
    item-rgp: red glass pane
 
    join-message: Change This To Your Join Message! (Make sure to use '%{_p}%' when setting player name. ex. "Player %{_p}% has joined!" would turn to "Player MyNameJeff has joined!")
    leave-message: Change This To Your Leave Message! (Make sure to use '%{_p}%' when setting player name. ex. "Player %{_p}% has left!" would turn to "Player MyNameJeff has left!")
 
    top-line: &a——————————&e‹[ &6&lFakeLog &e]›&a——————————
    last-line: &a——————————&e‹[ &6&lVer. 1.0 &e]›&a——————————
 
    mutual: §e[§6§lFakeLog§e] §7Right Click to Open GUI
    enable: §e[§6§lFakeLog§e] §aEnabled
    disable: §e[§6§lFakeLog§e] §cDisabled
 
    m-1: §5Right click to enable.
    e-1: §5When you right click with this item,
    e-2: §5you will officially return to the player
    e-3: §5radar!
    d-1: §5When you right click this item,
    d-2: §5you will officially go off the player
    d-3: §5radar!
 
    perm: fakelog.use
    perm-msg: &4Error: &cYou do not have sufficient permissions to do this.
    msg: &4Error: &c/flog &8[&7Do &f/flog&7 to FakeLogin or FakeLogout.&8]
    desc: FakeLog is used to trick others into thinking you went offline or online.
 
    vanish-on: supervanish on
    vanish-off: supervanish off
 
#========================================================#
#
#                        Command
#
#========================================================#
 
command /fakelog:
    aliases: /fakel, /flog, /fl
    executable by: players
    usage: {@msg}
    permission: {@perm}
    permission message: {@perm-msg}
    description: {@desc}
    trigger:
        wait 2 ticks
        if sender has permission "{@perm}":
      
            set slot 8 of player to {@item} named "{@mutual}"
      
            loop all items in player's inventory:
                if loop-item's name is "{@mutual}":
                    set line 2 of loop-item's lore to "{@m-1}"
      
                    send "{@fakelog} &aYou have been given the &6&lFakeLog&a item!" to player

#========================================================#
#
#                Code that makes it usable!
#
#========================================================#
              
on place:
    if event-block is {@item}:
        set {_name} to name of player's tool
        if "%{_name}%" is "{@mutual}":
  
            cancel event
      
            wait 2 ticks
            close the player's inventory
      
    else if event-block is {@item-ggp}:
        set {_name} to name of player's tool
        if "%{_name}%" is "{@enable}":
  
            cancel event
      
            wait 2 ticks
            close the player's inventory
      
    else if event-block is {@item-rgp}:
        set {_name} to name of player's tool
        if "%{_name}%" is "{@disable}":
  
            cancel event
      
            wait 1 ticks
            close the player's inventory
 
      
on drop:
    if player has permission "{@perm}":
        if item's name is "{@mutual}" or "{@enable}" or "{@disable}":
      
            cancel event
      
    else if player doesn't have permission "{@perm}":
        if item's name is "{@mutual}" or "{@enable}" or "{@disable}":
  
            cancel event
      
on inventory click:
    if player has permission "{@perm}":
        if name of clicked item is "{@mutual}" or "{@enable}" or "{@disable}":
            if line 2 of lore of clicked item is "{@m-1}" or "{e-1}" or "{@d-1}":

                cancel event


on right click:
    if player has permission "{@perm}":
        if name of item is "{@mutual}" or "{@enable}" or "{@disable}":
            if line 2 of lore of item is "{@m-1}" or "{@e-1}" or "{@d-1}":
      
                open virtual chest inventory with size 1 named "{@fakelog}" to player
          
                set {_ggp} to green glass pane named "{@enable}" with lore " ||{@e-1}||{@e-2}||{@e-3}"
                set {_rgp} to red glass pane named "{@disable}" with lore " ||{@d-1}||{@d-2}||{@d-3}"
                set {_r} to barrier named "&7&lRemove {@fakelog} &7&lItem" with lore " ||§5Left click me to remove||§5the {@fakelog}§5 item!"
          
                format gui slot 2 of player with {_ggp} to close then run function enable(player, "left") with "left" click
                format gui slot 4 of player with {_r} to close then run function mutual(player, "left") with "left" click
                format gui slot 6 of player with {_rgp} to close then run function disable(player, "left") with "left" click
 
    else:
        send "{@perm-msg}" to player
  
#========================================================#
#
#                        Functions
#
#                I suggest you not touch
#            these unless you know what you're
#                        doing!
#
#========================================================#
  
function enable(p: player, ct: string):
    if {_ct} is "left":
  
        loop 200 times:
            send "" to {_p}
  
        wait 2 ticks
 
        set slot 8 of {_p} to {@item-ggp} named "{@enable}"
  
        loop all items in {_p}'s inventory:
            if loop-item's name is "{@enable}":
                set line 2 of loop-item's lore to "{@e-1}"
                set line 3 of loop-item's lore to "{@e-2}"
                set line 4 of loop-item's lore to "{@e-3}"
          
        broadcast "{@leave-message}"

        make {_p} run cmd "{@vanish-on}" as op
          
function disable(p: player, ct: string):
    if {_ct} is "left":
 
        loop 200 times:
            send "" to {_p}
  
        wait 2 ticks
  
        set slot 8 of {_p} to {@item-rgp} named "{@disable}"
  
        loop all items in {_p}'s inventory:
            if loop-item's name is "{@disable}":
                set line 2 of loop-item's lore to "{@d-1}"
                set line 3 of loop-item's lore to "{@d-2}"
                set line 4 of loop-item's lore to "{@d-3}"
          
        broadcast "{@join-message}"

        make {_p} run cmd "{@vanish-off}" as op
  
function mutual(p: player, ct: string):
    if {_ct} is "left":
 
        loop 200 times:
            send "" to {_p}
  
        wait 2 ticks
 
        clear slot 8 of {_p}'s inventory
  
        send "{@fakelog} &aYou have been revealed once again and the item is gone!" to {_p}
  
        broadcast "{@join-message}"

        make {_p} run cmd "{@vanish-off}" as op
Plugins Needed

Plugins Needed:
I feel bad for saying this, and like a total idiot. But I do not know exactly what plugins made the Skript functionable. Please refer to the screenshot of the plugins I had installed when it would work.

Quick Reminder: This is my first ever Skript that I actually did good on. It is fully customizable to your liking, please pm me on Discord at Chastros#1422 or go to https://discord.gg/BPkgAUf - I will do the best of my ability to help you with any skript if needed.

Anyways, I hope you all enjoy. Please leave feedback in the comment section so I can figure out what I need to improve upon. Thank you!

Similar projects

Plugin →