-- local script 

local player = game.Players.LocalPlayer
local ScreenGui = script.Parent.Frame

local function checkKnightValue()
	local knightValue = player:FindFirstChild("Knight")
	if knightValue and knightValue.Value then
		ScreenGui.Visible = true
	else
		ScreenGui.Visible = false
	end
end

player.ChildAdded:Connect(checkKnightValue)
player.ChildRemoved:Connect(checkKnightValue)
checkKnightValue()
