#!Made by FinalPlayer024 - @SkriptGeT on Telegram #!---------------------------------------------- #!Edit here if you want to! options: seconds: 120 #!Do not edit or insert a number higher than 120 #!Telegram: #! ____ ____ _ _ _ ____ _____ #! / __ \ / ___| | | __ _ __ (_) _ __ | |_ / ___| ___ |_ _| #! / / _` | \___ \ | |/ / | '__| | | | '_ \ | __| | | _ / _ \ | | #! | | (_| | ___) | | < | | | | | |_) | | |_ | |_| | | __/ | | #! \ \__,_| |____/ |_|\_\ |_| |_| | .__/ \__| \____| \___| |_| #! \____/ |_| #!Important! command /AFKLOC []: trigger: if arg 1 is not set: set {GLOBAL.AFKLOC} to location of executor send "&3» &bSuccessfully set AFK location!" to executor stop else if arg 1 is set: if arg 1 is "clear": clear {GLOBAL.AFKLOC} send "&3» &bSuccessfully cleared AFK location!" to executor stop if arg 1 is "set": set {GLOBAL.AFKLOC} to location of executor send "&3» &bSuccessfully set AFK location!" to executor stop else if arg 1 is not "clear" or "set": send "&3» &cWhoops.. Usage: /afkloc - To set AFK location%last character of nl%/afkloc set - Same%last character of nl%/afkloc clear - To clear AFK location" to executor stop stop #!Code here! command /afk: aliases: /skafk trigger: if {afk::%executor%} is not set: set {afk::%executor%} to true broadcast "&3» &b%executor% is now AFK!" send executor title "&bYou are AFK!" with subtitle "&7Come on.. wake up! Do not leave them alone!" for 999 days set {firstloc::%executor%} to location of executor if {GLOBAL.AFKLOC} is not set: send "&3» &cWhoops.. a variable is not set, contact an &c&lAdministrator!" to executor stop else if {GLOBAL.AFKLOC} is set: set {_countdown} to 6 loop 5 times: remove 1 from {_countdown} set action bar of executor to "&3» &b%{_countdown}% seconds left!" wait 1 second teleport executor to {GLOBAL.AFKLOC} set action bar of executor to "&3» &bTeleported!" stop else if {afk::%executor%} is true: clear {afk::%executor%} broadcast "&3» &b%executor% is no longer AFK!" send executor title "&bYou are no longer AFK!" with subtitle "&7Oh! You are alive!" for 5 seconds set {_countdown} to 6 loop 5 times: remove 1 from {_countdown} set action bar of executor to "&3» &b%{_countdown}% seconds left!" wait 1 second set action bar of executor to "&3» &bTeleported!" teleport executor to {firstloc::%executor%} stop on join: if {afk::%player%} is not set: stop else if {afk::%player%} is true: clear {afk::%player%} stop on command: if {afk::%executor%} is not set: stop else if {afk::%executor%} is true: clear {afk::%executor%} broadcast "&3» &b%executor% is no longer AFK!" send executor title "&bYou are no longer AFK!" with subtitle "&7Oh! You are alive!" for 5 seconds set {_countdown} to 6 loop 5 times: remove 1 from {_countdown} set action bar of executor to "&3» &b%{_countdown}% seconds left!" wait 1 second set action bar of executor to "&3» &bTeleported!" teleport executor to {firstloc::%executor%} stop on chat: if {afk::%player%} is not set: stop else if {afk::%player%} is true: clear {afk::%player%} wait 2 ticks broadcast "&3» &b%player% is no longer AFK!" send player title "&bYou are no longer AFK!" with subtitle "&7Oh! You are alive!" for 5 seconds set {_countdown} to 6 loop 5 times: remove 1 from {_countdown} set action bar of player to "&3» &b%{_countdown}% seconds left!" wait 1 second set action bar of executor to "&3» &bTeleported!" teleport player to {firstloc::%player%} stop on any move: if {afk::%player%} is not set: stop else if {afk::%player%} is true: clear {afk::%player%} broadcast "&3» &b%player% is no longer AFK!" send player title "&bYou are no longer AFK!" with subtitle "&7Oh! You are alive!" for 5 seconds set {_countdown} to 6 loop 5 times: remove 1 from {_countdown} set action bar of player to "&3» &b%{_countdown}% seconds left!" wait 1 second set action bar of player to "&3» &bTeleported!" teleport player to {firstloc::%player%} stop every 120 seconds: loop all players: set {_loc1.%loop-player%} to location of loop-player wait 60 seconds set {_loc2.%loop-player%} to location of loop-player if {_loc1.%loop-player%} = {_loc2.%loop-player%}: if {afk::%loop-player%} is true: stop else if {afk::%loop-player%} is not set: set {afk::%loop-player%} to true broadcast "&3» &b%loop-player% is now AFK!" send loop-player title "&bYou are AFK!" with subtitle "&7&7Come on.. wake up! Do not leave them alone!" for 999 days set {firstloc::%loop-player%} to location of loop-player if {GLOBAL.AFKLOC} is not set: send "&3» &cWhoops... A variable is not set, contact an Administrator!" to loop-player stop else if {GLOBAL.AFKLOC} is set: set {_countdown} to 6 loop 5 times: remove 1 from {_countdown} set action bar of loop-player to "&3» &b%{_countdown}% seconds left!" wait 1 second teleport loop-player to {GLOBAL.AFKLOC} set action bar of loop-player to "&3» &bTeleported!" stop else if {_loc1.%loop-player%} is not {_loc2.%loop-player%}: stop