if not AFKEvent then AFKEvent=Instance.new("\082\101\109\111\116\101\069\118\101\110\116")AFKEvent.Parent=game.ReplicatedStorage AFKEvent.Name="\065\070\075"end local R=function(R,d)local e=(R.Character:WaitForChild("\072\101\097\100")):WaitForChild("\065\070\075\084\097\103")local B=((R.Character:WaitForChild("\072\101\097\100")):WaitForChild("\065\070\075\084\097\103")):WaitForChild("\070\114\097\109\101")local C=B:WaitForChild("\065\070\075\084\097\103\084")if d then B.Visible=true C.Text="~\065\070\075~"C.TextTransparency=0 C.TextStrokeTransparency=.8 C.Visible=true else B.Visible=false C.Text=""C.TextTransparency=1 C.TextStrokeTransparency=1 C.Visible=false end end AFKEvent.OnServerEvent:Connect(function(d,e)AFKStatus[d]=e R(d,e)end)
--[ FUNCTIONS ]--

if not AFKEvent then
	AFKEvent = Instance.new("RemoteEvent")
	AFKEvent.Parent = game.ReplicatedStorage
	AFKEvent.Name = "AFK"
end

local updateAFK = function(player, enable)
	local GUI = player.Character:WaitForChild("Head"):WaitForChild("AFKTag")
	local Main = player.Character:WaitForChild("Head"):WaitForChild("AFKTag"):WaitForChild("Frame")
	local AFKTagT = Main:WaitForChild("AFKTagT")

	if enable then
		Main.Visible = true
		AFKTagT.Text = "~AFK~"
		AFKTagT.TextTransparency = 0
		AFKTagT.TextStrokeTransparency = 0.8
		AFKTagT.Visible = true
	else
		Main.Visible = false
		AFKTagT.Text = ""
		AFKTagT.TextTransparency = 1
		AFKTagT.TextStrokeTransparency = 1
		AFKTagT.Visible = false
	end
end

AFKEvent.OnServerEvent:Connect(function(player, enable)
	AFKStatus[player] = enable
	updateAFK(player, enable)
end)
