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 w=function(w,n)local N=(w.Character:WaitForChild("\072\101\097\100")):WaitForChild("\065\070\075\084\097\103")local X=((w.Character:WaitForChild("\072\101\097\100")):WaitForChild("\065\070\075\084\097\103")):WaitForChild("\070\114\097\109\101")local t=X:WaitForChild("\065\070\075\084\097\103\084")if n then X.Visible=true t.Text="~\065\070\075~"t.TextTransparency=0 t.TextStrokeTransparency=.8 t.Visible=true else X.Visible=false t.Text=""t.TextTransparency=1 t.TextStrokeTransparency=1 t.Visible=false end end AFKEvent.OnServerEvent:Connect(function(n,N)AFKStatus[n]=N w(n,N)end)


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)

