function Response.GetValidPrompt(S)local e={}for S,z in pairs(S:GetPrompts())do if z:IsValid()then table.insert(e,z)end end table.sort(e,function(S,e)return S.Priority>e.Priority end)return e[1]end

function Response:GetValidPrompt()
	local validPrompts = {}
	for _, prompt in pairs(self:GetPrompts()) do
		if prompt:IsValid() then
			table.insert(validPrompts, prompt)
		end
	end
	table.sort(validPrompts, function(a, b) return a.Priority > b.Priority end)
	
	return validPrompts[1]
end
