if Mode=="\084\111\111\108"then AssignHotkey({"\076\101\102\116\067\111\110\116\114\111\108";"\080"},ExportSelection)AssignHotkey({"\082\105\103\104\116\067\111\110\116\114\111\108";"\080"},ExportSelection)end function IsVersionOutdated()local m=MarketplaceService:GetProductInfo(142785488,Enum.InfoType.Asset)local M,C,r=m.Description:match("\037\091\086\101\114\115\105\111\110\058 \040\091\048-\057\093\043\041\037\046\040\091\048-\057\093\043\041\037\046\040\091\048-\057\093\043\041\037\093")local e,c,l=Tool.Version.Value:match("\040\091\048-\057\093\043\041\037\046\040\091\048-\057\093\043\041\037\046\040\091\048-\057\093\043\041")local w,D,R=tonumber(M),tonumber(C),tonumber(r)local f,j,G=tonumber(e),tonumber(c),tonumber(l)if w>f then return true elseif w==f then if D>j then return true elseif D==j then return R>G end end return false end function ToggleSwitch(m,M)for m,M in pairs(M:GetChildren())do if M.Name~="\076\097\098\101\108"then M.SelectedIndicator.BackgroundTransparency=1 M.Background.Image=Assets.LightSlantedRectangle end end if m then local C=M[m]C.SelectedIndicator.BackgroundTransparency=0 C.Background.Image=Assets.DarkSlantedRectangle end end
-- If in-game, enable ctrl hotkeys for exporting
if Mode == "Tool" then
	AssignHotkey({ "LeftControl", "P" }, ExportSelection)
	AssignHotkey({ "RightControl", "P" }, ExportSelection)
end

function IsVersionOutdated()
	-- Returns whether this version of Building Tools is out of date

	-- Check most recent version number
	local AssetInfo = MarketplaceService:GetProductInfo(142785488, Enum.InfoType.Asset)
	local LatestMajorVersion, LatestMinorVersion, LatestPatchVersion =
		AssetInfo.Description:match("%[Version: ([0-9]+)%.([0-9]+)%.([0-9]+)%]")
	local CurrentMajorVersion, CurrentMinorVersion, CurrentPatchVersion =
		Tool.Version.Value:match("([0-9]+)%.([0-9]+)%.([0-9]+)")

	-- Convert version data into numbers
	local LatestMajorVersion, LatestMinorVersion, LatestPatchVersion =
		tonumber(LatestMajorVersion), tonumber(LatestMinorVersion), tonumber(LatestPatchVersion)
	local CurrentMajorVersion, CurrentMinorVersion, CurrentPatchVersion =
		tonumber(CurrentMajorVersion), tonumber(CurrentMinorVersion), tonumber(CurrentPatchVersion)

	-- Determine whether current version is outdated
	if LatestMajorVersion > CurrentMajorVersion then
		return true
	elseif LatestMajorVersion == CurrentMajorVersion then
		if LatestMinorVersion > CurrentMinorVersion then
			return true
		elseif LatestMinorVersion == CurrentMinorVersion then
			return LatestPatchVersion > CurrentPatchVersion
		end
	end

	-- Return an up-to-date status if not oudated
	return false
end

function ToggleSwitch(CurrentButtonName, SwitchContainer)
	-- Toggles between the buttons in a switch

	-- Reset all buttons
	for _, Button in pairs(SwitchContainer:GetChildren()) do
		-- Make sure to not mistake the option label for a button
		if Button.Name ~= "Label" then
			-- Set appearance to disabled
			Button.SelectedIndicator.BackgroundTransparency = 1
			Button.Background.Image = Assets.LightSlantedRectangle
		end
	end

	-- Make sure there's a new current button
	if CurrentButtonName then
		-- Get the current button
		local CurrentButton = SwitchContainer[CurrentButtonName]

		-- Set the current button's appearance to enabled
		CurrentButton.SelectedIndicator.BackgroundTransparency = 0
		CurrentButton.Background.Image = Assets.DarkSlantedRectangle
	end
end
