function onTalk()
	local location = ""
	local hasgolden = getFlag("flag_golden")
	if arguments and type(arguments) == 'string' then
		location = arguments
	end
	if hasgolden == true then
		wait(0.2)
		teleport(232, 152, "GymHub")
		endCutscene()
	end
	disableMovement()
	choiceDialog({
	{
		"Violet_HardlistGyms_Close",
		onChosen = function ()
				closeChoiceDialog()
		end
	},
	{
		"Violet_HardlistGyms_Hub",
		onChosen = function ()
				teleport(232, 152, "GymHub")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_1",
		requires =
		function ()
			if location == "CrouchTech_1" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(200, 288, "CrouchPreservation")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_2",
		requires =
		function ()
			if location == "CrouchTech_2" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(432, 288, "CrouchPreservation")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_3",
		requires =
		function ()
			if location == "CrouchTech_3" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(700, 500, "CrouchPreservation")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_4",
		requires =
		function ()
			if location == "CrouchTech_4" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(600, 0, "CrouchPreservation")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
		{
		"Violet_PlusOneGym_CrouchTech_loc_5",
		requires =
		function ()
			if location == "CrouchTech_5" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(1100, 500, "CrouchPreservation")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_6",
		requires =
		function ()
			if location == "CrouchTech_6" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(1300, 152, "CrouchPreservation")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_7",
		requires =
		function ()
			if location == "CrouchTech_7" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(1500, 152, "CrouchPreservation")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_8",
		requires =
		function ()
			if location == "CrouchTech_8" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(104, 152, "CrouchTech2")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	},
	{
		"Violet_PlusOneGym_CrouchTech_loc_9",
		requires =
		function ()
			if location == "CrouchTech_9" then
				return false
			end
			return true
		end,
		onChosen = function ()
				teleportTo(2000, 152, "CrouchTech2")
		end,
		onEnd = function ()
                closeChoiceDialog()
		end
	}
	})
	enableMovement()
end

function onEnd(room, wasSkipped)
    if wasSkipped then
        enableMovement()
    end
end
