local player = game.Players.LocalPlayer
local bool = player.PlayerGui:WaitForChild("Values"):WaitForChild("Key")
bool.Changed:Connect(function()
print("7")
if bool.Value == true then
print("9")
local ScreenGUI = player.PlayerGui.DialogueWithPortraitAndChoices
UserInputService.InputBegan:Connect(function(input)
if UserInputService:GetFocusedTextBox() then
print("13")
return
end
if input.KeyCode == Enum.KeyCode.X then
ScreenGUI:Destroy()
else
ScreenGUI:Destroy()
end
end)
bool.Value = false
end
end)