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 a=MarketplaceService:GetProductInfo(142785488,Enum.InfoType.Asset)local G,h,J=a.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,m,N=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 b,o,k=tonumber(G),tonumber(h),tonumber(J)local d,r,M=tonumber(e),tonumber(m),tonumber(N)if b>d then return true elseif b==d then if o>r then return true elseif o==r then return k>M end end return false end function ToggleSwitch(a,G)for a,G in pairs(G:GetChildren())do if G.Name~="\076\097\098\101\108"then G.SelectedIndicator.BackgroundTransparency=1 G.Background.Image=Assets.LightSlantedRectangle end end if a then local h=G[a]h.SelectedIndicator.BackgroundTransparency=0 h.Background.Image=Assets.DarkSlantedRectangle end end

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;
