Adding Tags to the Project template script?

I have been using the below script to generate a “Project” folder structure, and it works perfectly. One thing I now end up doing after the folder structure is created is to add a Tag (or multiple Tags) to the newly created Project folder. It would be ideal if I could amend the script to add these tags via a second dialog box. Sadly my scripting capabilities fall well short of what I imagine them to be.… Any easy way to add this in?

-- Smart template adding a localized project template to the current group
-- Written by Eric Böhnisch-Volkmann, modified by Christian Grunenberg
-- © 2009–2016 DEVONtechnologies, LLC
-- Default non-localized project name, also used to identify the resources
property pTemplateName : "%groupName%"
property pAboutDocument : "About this project"
property pBlackColor : {0, 0, 0} -- RTF text color
-- Import helper library
tell application "Finder" to set pathToAdditions to ((path to application id "DNtp" as string) & "Contents:Resources:Template Script Additions.scpt") as alias
set helperLibrary to load script pathToAdditions
try
	-- We're later working in DEVONthink, we need to cache localized strings while still in our realm
	set theProjectName to localized string pTemplateName
	tell application id "DNtp"
		-- Let the user change the project name
		set theProjectName to display name editor my helperLibrary's localizedString(pTemplateName) default answer "New Project" info (my helperLibrary's localizedString("Please enter a name for this project")) as string
		set thePlaceholders to {|%project%|:theProjectName}
		-- Import the predefined structure
		set theTemplateFiles to helperLibrary's pathToLocalizedResources() & my helperLibrary's localizedString(pTemplateName)
		set theRecord to import theTemplateFiles placeholders thePlaceholders to current group
		set (name of theRecord) to (name of theRecord & ": " & theProjectName as string) -- Rename to user-defined project name
	end tell
on error errMsg number errNum
	if errNum ≠ -128 then display alert (localized string "An error occured when creating the new project structure") message errMsg as warning
end try

Note: When posting code, please use three backticks, followed by the code, followed by three backticks, so it displays in a code block. I’ve made the adjustment to your post already.

You can add this code after this line…

set the name of theRecord to theProjectName -- Rename to user-defined project name
		-- Adding Tags
		set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ";"}
		
		set theTags to text returned of (display dialog "Enter tags for the project, separated by semicolons:" default answer "Neumann, Jim; author")
		if theTags ≠ "" then
			set tagList to text items of theTags
			set tags of theRecord to tagList
			set AppleScript's text item delimiters to od
		end if