function Window.SetVisible(o,m)Gui.Visible=m if m then Entry.TextBox:CaptureFocus()o:SetEntryText("")if o.Cmdr.ActivationUnlocksMouse then o.PreviousMouseBehavior=UserInputService.MouseBehavior UserInputService.MouseBehavior=Enum.MouseBehavior.Default end else Entry.TextBox:ReleaseFocus()o.AutoComplete:Hide()if o.PreviousMouseBehavior then UserInputService.MouseBehavior=o.PreviousMouseBehavior o.PreviousMouseBehavior=nil end end end

function Window:SetVisible(visible)
	Gui.Visible = visible

	if visible then
		Entry.TextBox:CaptureFocus()
		self:SetEntryText("")

		if self.Cmdr.ActivationUnlocksMouse then
			self.PreviousMouseBehavior = UserInputService.MouseBehavior
			UserInputService.MouseBehavior = Enum.MouseBehavior.Default
		end
	else
		Entry.TextBox:ReleaseFocus()
		self.AutoComplete:Hide()

		if self.PreviousMouseBehavior then
			UserInputService.MouseBehavior = self.PreviousMouseBehavior
			self.PreviousMouseBehavior = nil
		end
	end
end
